<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
  <channel>
    <title>Lập Trình Website MVC5 &amp; MVC6</title>
    <description>Bài tập, bài giảng về Mô Hình MVC5 và MVC6, học lập trình Website trên mô hình MVC5 và MVC6, bài giảng về MVC học ở Nhất Nghệ và FptNaNo</description>
    <pubDate>Tue, 10 Mar 2026 02:57:28 +0000</pubDate>
    <lastBuildDate>Tue, 10 Mar 2026 02:57:28 +0000</lastBuildDate>
    <generator>Diễn đàn CNTT | Forum CNTT Cộng đồng Tin học Việt Nam ITSEOVN</generator>
    <link>https://itseovn.com/forums/mvc-aspnet/</link>
    <atom:link rel="self" type="application/rss+xml" href="https://itseovn.com/forums/mvc-aspnet/index.rss"/>
    <item>
      <title>Add thêm PDF.JS vào web asp.net MVC hướng dẫn chi tiết dễ làm theo</title>
      <pubDate>Fri, 08 Mar 2024 01:59:25 +0000</pubDate>
      <link>https://itseovn.com/threads/add-them-pdf-js-vao-web-asp-net-mvc-huong-dan-chi-tiet-de-lam-theo.328355/</link>
      <guid>https://itseovn.com/threads/add-them-pdf-js-vao-web-asp-net-mvc-huong-dan-chi-tiet-de-lam-theo.328355/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[<h2 class="theh2">PDF.JS là gì</h2><br />
PDF.js là một thư viện <a href="https://itseovn.com/forums/javascript-js/" class="keywordReplace">JavaScript</a> dùng để hiển thị các tệp định dạng tài liệu có đuôi .PDF trên các trình duyệt và đặc biệt là trình duyệt di động bằng cách sử dụng HTML5 Canvas theo tiêu chuẩn web.<br />
<br />
Vì mặc định hiện tại các trình duyệt di động và một số trình duyệt khi bạn nhúng iframe hay nhúng PDF vào web sẽ không xem được trên trình duyệt di động và một số trình duyệt cũ.<br />
<br />
PDF.JS ra đời giúp chúng ta xem và quản lý file PDF dưới mọi hình thức và xem được file PDF ở...<br />
<br />
<a href="https://itseovn.com/threads/add-them-pdf-js-vao-web-asp-net-mvc-huong-dan-chi-tiet-de-lam-theo.328355/" class="internalLink">Add thêm PDF.JS vào web asp.net MVC hướng dẫn chi tiết dễ làm theo</a>]]></content:encoded>
    </item>
    <item>
      <title>Tải đầu bị chậm: ASP.NET Slow on first access MVC</title>
      <pubDate>Wed, 12 Jul 2023 07:55:48 +0000</pubDate>
      <link>https://itseovn.com/threads/tai-dau-bi-cham-asp-net-slow-on-first-access-mvc.320978/</link>
      <guid>https://itseovn.com/threads/tai-dau-bi-cham-asp-net-slow-on-first-access-mvc.320978/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Thường cách web MVC tải ban đầu thường rất chậm, do dữ liệu ban đầu truy cập vào web cần khởi động các miền ứng dụng chạy web, nên web lần đầu vào sẽ rất chậm, chúng được làm mới sau 15p - 30p, và cứ sau thời gian này người nào đầu tiên truy cập vào web lại rất chậm.<br />
<br />
Để khắc phục tải ban đầu chậm trong MVC các bạn phải có quyền truy cập <a href="https://itseovn.com/forums/vps-hosting-linux-windows/" class="keywordReplace">VPS</a> hoặc liên hệ nhà cung cấp để họ cấu hình cho bạn, việc cấu hình như sau:<br />
<br />
Truy cập vào IIS của bạn -&gt; <b><span style="color: #ff0000">Application Pools</span></b> -&gt;...<br />
<br />
<a href="https://itseovn.com/threads/tai-dau-bi-cham-asp-net-slow-on-first-access-mvc.320978/" class="internalLink">Tải đầu bị chậm: ASP.NET Slow on first access MVC</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Lỗi: You are debugging a Release build of .dll. Using just My Code in Visual Studio 2019</title>
      <pubDate>Thu, 08 Jun 2023 04:24:50 +0000</pubDate>
      <link>https://itseovn.com/threads/loi-you-are-debugging-a-release-build-of-dll-using-just-my-code-in-visual-studio-2019.325879/</link>
      <guid>https://itseovn.com/threads/loi-you-are-debugging-a-release-build-of-dll-using-just-my-code-in-visual-studio-2019.325879/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Lỗi: You are debugging a Release build of .dll. Using just My Code  with Release builds using compilier optimizations results in a degraded debugging experience (e.g breakpoints will not be hit) in Visual Studio 2019.<br />
<br />


	<a href="https://itseovn.com/attachments/37558/" target="_blank">View attachment 37558</a>
	
 <br />
<br />
Mình đang debug trên Microsoft Visual Studio Professional 2019 thì bị báo lỗi như trên: Just My Code Waming.]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Clear cache in Linq, xóa Cache lưu trong Linq asp.net MVC</title>
      <pubDate>Fri, 01 Jul 2022 02:50:52 +0000</pubDate>
      <link>https://itseovn.com/threads/clear-cache-in-linq-xoa-cache-luu-trong-linq-asp-net-mvc.324716/</link>
      <guid>https://itseovn.com/threads/clear-cache-in-linq-xoa-cache-luu-trong-linq-asp-net-mvc.324716/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Chào mọi người, em muốn xóa cái cache linQ thì làm như thế nào, vì khi em thay đổi nội dung, cái em qua màn hình khác thì nó không có cập nhật nội dung mới em đã update.<br />
Ý là em có cái table user, em thao tác update mật khẩu 1 lúc nhiều tài khoản, lúc vào database thấy nó đổi rồi.<br />
Mà khi sử dụng câu lệnh Linq thì nó vẫn chưa đổi hizzz.<br />
Giờ em muốn xóa cache, clear cache linq thì làm sao, cảm ơn, em sử dụng web Asp.net MVC 5\<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>
ShopModel db = new ShopModel();
public ActionResult...</pre>
</div><a href="https://itseovn.com/threads/clear-cache-in-linq-xoa-cache-luu-trong-linq-asp-net-mvc.324716/" class="internalLink">Clear cache in Linq, xóa Cache lưu trong Linq asp.net MVC</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>There is already an open DataReader associated with this Command which must be closed first</title>
      <pubDate>Fri, 21 May 2021 08:22:39 +0000</pubDate>
      <link>https://itseovn.com/threads/there-is-already-an-open-datareader-associated-with-this-command-which-must-be-closed-first.322576/</link>
      <guid>https://itseovn.com/threads/there-is-already-an-open-datareader-associated-with-this-command-which-must-be-closed-first.322576/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Lỗi khi lấy dữ liệu từ linq nhiều lần: There is already an open DataReader associated with this Command which must be closed first.<br />
<br />
Khi mình lấy dữ liệu xử lý add thì bị lỗi dữ liệu như trên, mình không biết làm sao để xử lý nếu không vượt qua được lỗi này.<br />
<br />
Bạn nào biết cách xử lý giúp mình với:<br />



<div class="bbCodeBlock bbCodeQuote">
	<aside>
		
		<blockquote class="quoteContainer"><div class="quote">There is already an open DataReader associated with this Command which must be closed first.</div><div class="quoteExpand">Click to expand...</div></blockquote>
	</aside>
</div>Code của mình:<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>
var modelcate = dbc.Categories.Where(p=&gt; p.Id == null);
//danh sách...</pre>
</div><a href="https://itseovn.com/threads/there-is-already-an-open-datareader-associated-with-this-command-which-must-be-closed-first.322576/" class="internalLink">There is already an open DataReader associated with this Command which must be closed first</a>]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>Thông báo khi có đơn hàng mới vào Telegramtrong trong asp.net MVC</title>
      <pubDate>Mon, 29 Mar 2021 12:52:49 +0000</pubDate>
      <link>https://itseovn.com/threads/thong-bao-khi-co-don-hang-moi-vao-telegramtrong-trong-asp-net-mvc.322309/</link>
      <guid>https://itseovn.com/threads/thong-bao-khi-co-don-hang-moi-vao-telegramtrong-trong-asp-net-mvc.322309/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Việc sử dụng đơn hàng thông báo qua email đôi khi khá bất tiện và đôi khi bạn sẽ không biết được đơn có tới hay không vì email nhiều khi hay bị rơi mục rác hoặc có báo email tới mà nhiều email rác quá làm bạn không để ý đơn hàng, đặc biệt khi sử dụng web asp.net mvc thường email báo hay bị lỗi không gửi đi được.<br />
<br />
Để giải quyết vấn đề này hôm nay mình hướng dẫn các bạn khi có đơn hàng sẽ tự động nhắn tin báo vào telegram điện thoại của bạn rất dễ dàng nhìn thấy vào 1 nhóm riêng, thông qua API...<br />
<br />
<a href="https://itseovn.com/threads/thong-bao-khi-co-don-hang-moi-vao-telegramtrong-trong-asp-net-mvc.322309/" class="internalLink">Thông báo khi có đơn hàng mới vào Telegramtrong trong asp.net MVC</a>]]></content:encoded>
    </item>
    <item>
      <title>LINQ to Entities does not recognize the method 'AddMonths()' method</title>
      <pubDate>Tue, 15 Dec 2020 09:54:58 +0000</pubDate>
      <link>https://itseovn.com/threads/linq-to-entities-does-not-recognize-the-method-addmonths-method.321786/</link>
      <guid>https://itseovn.com/threads/linq-to-entities-does-not-recognize-the-method-addmonths-method.321786/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Web mình bị lỗi lệnh LINQ mà mình kiểm tra thấy rất bình thường? bạn nào biết giúp mình với. Nó báo lỗi như sau:<br />
<span style="font-size: 18px"><b> <i>LINQ to Entities does not recognize the method &#039;System.DateTime AddMonths(Int32)&#039; method, and this method cannot be translated into a store expression.</i> </b></span><br />
 <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the...<br />
<br />
<a href="https://itseovn.com/threads/linq-to-entities-does-not-recognize-the-method-addmonths-method.321786/" class="internalLink">LINQ to Entities does not recognize the method &#039;AddMonths()&#039; method</a>]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>Minify HTML, CSS, JS trong MVC với ZetaProducerHtmlCompressor</title>
      <pubDate>Wed, 09 Dec 2020 12:22:48 +0000</pubDate>
      <link>https://itseovn.com/threads/minify-html-css-js-trong-mvc-voi-zetaproducerhtmlcompressor.320780/</link>
      <guid>https://itseovn.com/threads/minify-html-css-js-trong-mvc-voi-zetaproducerhtmlcompressor.320780/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Mình có đọc có nhiều bạn hỏi cách tối ưu Minify HTML, CSS style, javascript, JS trong MVC như thế nào? và đặc biệt phiên bản MVC 5, MVC 6 trở lên như thế nào? hôm nay mình thay mặt Admin viết bài này, vì kiến thức được chia sẻ từ admin itseovn.<br />
<span style="font-family: 'helvetica'"><span style="color: rgb(20, 20, 20)"><br />
Cách Minify HTML mình sử dụng ZetaProducerHtmlCompressor để nén lại, tối ưu hóa tốc độ PageSpeed Insights của Google.<br />
<br />
Trước tiên bạn tải Nuget của ZetaProducerHtmlCompressor tại link sau (sau đó add dll vào...</span></span><br />
<br />
<a href="https://itseovn.com/threads/minify-html-css-js-trong-mvc-voi-zetaproducerhtmlcompressor.320780/" class="internalLink">Minify HTML, CSS, JS trong MVC với ZetaProducerHtmlCompressor</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Lỗi: There is already an open DataReader associated with this Command which must be closed first</title>
      <pubDate>Fri, 30 Oct 2020 06:06:08 +0000</pubDate>
      <link>https://itseovn.com/threads/loi-there-is-already-an-open-datareader-associated-with-this-command-which-must-be-closed-first.321296/</link>
      <guid>https://itseovn.com/threads/loi-there-is-already-an-open-datareader-associated-with-this-command-which-must-be-closed-first.321296/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Cho mình hỏi web asp.net MVC 5 của mình thực hiện lệnh linq như dưới thì bị lỗi: DataReader associatLỗi: There is already an opeed with this Command which must be closed first<br />



<div class="bbCodeBlock bbCodeQuote">
	<aside>
		
		<blockquote class="quoteContainer"><div class="quote"><span style="font-size: 22px"><b>Server Error in &#039;/&#039; Application.</b></span><br />
<span style="font-size: 18px"><b> <i>There is already an open DataReader associated with this Command which must be closed first.</i> </b></span><br />
 <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace...</div><div class="quoteExpand">Click to expand...</div></blockquote>
	</aside>
</div><a href="https://itseovn.com/threads/loi-there-is-already-an-open-datareader-associated-with-this-command-which-must-be-closed-first.321296/" class="internalLink">Lỗi: There is already an open DataReader associated with this Command which must be closed first</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Cách chèn Include Inline file css styles lên trên Razor View MVC</title>
      <pubDate>Tue, 27 Oct 2020 04:08:44 +0000</pubDate>
      <link>https://itseovn.com/threads/cach-chen-include-inline-file-css-styles-len-tren-razor-view-mvc.321249/</link>
      <guid>https://itseovn.com/threads/cach-chen-include-inline-file-css-styles-len-tren-razor-view-mvc.321249/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Khi bạn tối ưu tốc độ web asp.net nói chúng hay các web ở mọi lĩnh vực khác nhau nói riêng, chúng ta thường gặp phải lỗi: Loại bỏ các tài nguyên chặn hiển thị - Các tài nguyên đang chặn lần hiển thị đầu tiên của trang. Hãy cân nhắc phân phối nội dòng JS/Biểu định kiểu xếp chồng (CSS) quan trọng và trì hoãn mọi JS/kiểu không quan trọng.<br />
<br />
Lỗi này rất khó chịu trên toàn bộ website đang sử dụng, việc tối ưu cứ nghĩ cực khó, ai dè nó lại quá dễ đơn giản ở mọi web khác nhau, chỉ là cách xử lý như...<br />
<br />
<a href="https://itseovn.com/threads/cach-chen-include-inline-file-css-styles-len-tren-razor-view-mvc.321249/" class="internalLink">Cách chèn Include Inline file css styles lên trên Razor View MVC</a>]]></content:encoded>
    </item>
    <item>
      <title>MVC - Adding CSS class to Html.BeginForm() not working</title>
      <pubDate>Mon, 26 Oct 2020 17:48:32 +0000</pubDate>
      <link>https://itseovn.com/threads/mvc-adding-css-class-to-html-beginform-not-working.319873/</link>
      <guid>https://itseovn.com/threads/mvc-adding-css-class-to-html-beginform-not-working.319873/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Mình đang code website c# MVC, mình có sử dụng HTML.BEGINFORM, mình muốn thêm vào 1 class theo ý mà nó không hiện, mình nhớ là làm y như lần trước làm mà không biết sao cái của mình nó không hiện hicc ! nó toàn add cái class này vào biến url của cái beginform zzz,<br />
Bạn nào biết xử lý Adding CSS class to Html.BeginForm() mà hoạt động được không giúp mình với<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>
@using (Html.BeginForm(&quot;ExportToExcel&quot;, &quot;Product&quot;, new { @class = &quot;displaynone&quot; }))
{
      &lt;input type=&quot;submit&quot; value=&quot;Xuất File...</pre>
</div><a href="https://itseovn.com/threads/mvc-adding-css-class-to-html-beginform-not-working.319873/" class="internalLink">MVC - Adding CSS class to Html.BeginForm() not working</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Clear Cache của OutputCache như thế nào?</title>
      <pubDate>Mon, 12 Oct 2020 06:39:38 +0000</pubDate>
      <link>https://itseovn.com/threads/clear-cache-cua-outputcache-nhu-the-nao.320966/</link>
      <guid>https://itseovn.com/threads/clear-cache-cua-outputcache-nhu-the-nao.320966/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[HI mọi người cho mình hỏi vấn đề về website asp.net mvc, mình đang sử udngj cache của OutputCache mà mỗi lần xử lý xóa cache tìm hiểu mệt quá, nó không quản lý được và xóa được hay sao ấy.<br />
<br />
Mình đã tham khảo nhiều cách xóa cache như ở dưới có để code, mà không thể xóa được, bạn nào cho mình biết cách Clear xóa cache với.<br />
<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>var urlToRemove = Url.Action(&quot;AjaxHtmlOutputMethod&quot;, &quot;Controller&quot;);
HttpResponse.RemoveOutputCacheItem(urlToRemove);</pre>
</div>

<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>  [OutputCache (Duration=3600,...</pre>
</div><a href="https://itseovn.com/threads/clear-cache-cua-outputcache-nhu-the-nao.320966/" class="internalLink">Clear Cache của OutputCache như thế nào?</a>]]></content:encoded>
      <slash:comments>4</slash:comments>
    </item>
    <item>
      <title>Tạo Cache từ OutputCache mobile và laptop riêng trên asp.net mvc</title>
      <pubDate>Tue, 06 Oct 2020 08:15:54 +0000</pubDate>
      <link>https://itseovn.com/threads/tao-cache-tu-outputcache-mobile-va-laptop-rieng-tren-asp-net-mvc.320859/</link>
      <guid>https://itseovn.com/threads/tao-cache-tu-outputcache-mobile-va-laptop-rieng-tren-asp-net-mvc.320859/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Việc tạo cache riêng cho từng phiên bản mobi và latop khá quan trọng vì khi trình duyệt của bạn đang vào là mobi hay latop mặc định cache giao diện và dữ liệu đều được bắt giống nhau. Việc bắt cache giống nhau này khiến dữ liệu giữa mobi va latop có thay đôi về số liệu, giao diện hay trình xử lý view cũng gây lỗi giữa 2 giao diện mobi và latop.<br />
<br />
Để khắc phục vấn đề này, chúng ta xây dựng cho web phân biệt 2 phiên bản rõ riệt mobi và latop như sau:<br />
<br />
Truy cập vào Global.asax thêm code sau vào...<br />
<br />
<a href="https://itseovn.com/threads/tao-cache-tu-outputcache-mobile-va-laptop-rieng-tren-asp-net-mvc.320859/" class="internalLink">Tạo Cache từ OutputCache mobile và laptop riêng trên asp.net mvc</a>]]></content:encoded>
    </item>
    <item>
      <title>Minifier/Minify HTML Output trong MVC với WebMarkupMin.Core</title>
      <pubDate>Thu, 01 Oct 2020 09:50:06 +0000</pubDate>
      <link>https://itseovn.com/threads/minifier-minify-html-output-trong-mvc-voi-webmarkupmin-core.320792/</link>
      <guid>https://itseovn.com/threads/minifier-minify-html-output-trong-mvc-voi-webmarkupmin-core.320792/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Việc Minifier/Minify HTML Output dữ liệu được sinh ra bởi view rất quan trọng, khi dữ liệu bài viết, code html của bạn nhiều, đặc biệt với một số bạn thương viết js, css cùng với mã HTML gây dữ liệu rất lớn khi trả về view cho người dùng. Việc nén này vô cùng hiệu quả giúp giảm thiểu rất nhiều những dòng dữ liệu dư, khoảng trắng trong code html.<br />
<br />
Hình ảnh dữ liệu khi chưa được Minify<br />
<br />


	<a href="https://itseovn.com/attachments/37093/" target="_blank">View attachment 37093</a>
	
<br />
<br />
Sau khi sử dụng WebMarkupMin.Core để Minify HTML<br />
<br />
Từ Content-Length 18242 đã...<br />
<br />
<a href="https://itseovn.com/threads/minifier-minify-html-output-trong-mvc-voi-webmarkupmin-core.320792/" class="internalLink">Minifier/Minify HTML Output trong MVC với WebMarkupMin.Core</a>]]></content:encoded>
    </item>
    <item>
      <title>Minifier/Minify CSS, JS trong MVC bằng BuildBundlerMinifier hiệu quả</title>
      <pubDate>Thu, 01 Oct 2020 09:34:26 +0000</pubDate>
      <link>https://itseovn.com/threads/minifier-minify-css-js-trong-mvc-bang-buildbundlerminifier-hieu-qua.320791/</link>
      <guid>https://itseovn.com/threads/minifier-minify-css-js-trong-mvc-bang-buildbundlerminifier-hieu-qua.320791/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Việc tự động auto xử lý nén Minifier/Minify CSS, JS trong MVC asp.net vô cùng đơn giản với BuildBundlerMinifier với vài thao tác có thể sử dụng và điều khiển một cách dễ dàng giúp tăng điểm PageSpeed Insights trong google cực kỳ hiệu quả, bạn chỉ cài và cấu hình 1 lần, mỗi lần build code sẽ được minify rất nhanh gọn không hề phức tạp.<br />
<br />
Mặc định file CSS, JS của bạn sẽ xuống dòng như code sau (tương tự với js):<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>.div-abc
{
   color: red;
}</pre>
</div>BuildBundlerMinifier sẽ giúp bạn nén...<br />
<br />
<a href="https://itseovn.com/threads/minifier-minify-css-js-trong-mvc-bang-buildbundlerminifier-hieu-qua.320791/" class="internalLink">Minifier/Minify CSS, JS trong MVC bằng BuildBundlerMinifier hiệu quả</a>]]></content:encoded>
    </item>
    <item>
      <title>Lấy Entity Value old cũ sau đó Update không bị lỗi Asp.net MVC</title>
      <pubDate>Wed, 26 Aug 2020 08:24:27 +0000</pubDate>
      <link>https://itseovn.com/threads/lay-entity-value-old-cu-sau-do-update-khong-bi-loi-asp-net-mvc.317585/</link>
      <guid>https://itseovn.com/threads/lay-entity-value-old-cu-sau-do-update-khong-bi-loi-asp-net-mvc.317585/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[HI mọi người. Mình thực hiện lệnh update dữ liệu bảng product, trước khi thực hiện update mình có select ra giá trị của product cũ để so sánh giữa 2 phiên bản save xuống có khác nhau gì không để thực hiện xử lý dữ liệu.<br />
Khi update thì bị lỗi db.SaveChanges() không save được.<br />
<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>
 public ActionResult Update(Product model)
{
     var ProductCodeOld = db.Products.Where(p =&gt; p.Id == model.Id).FirstOrDefault().ProductCode;
     ......
     //thực hiện update thì bị lỗi...</pre>
</div><a href="https://itseovn.com/threads/lay-entity-value-old-cu-sau-do-update-khong-bi-loi-asp-net-mvc.317585/" class="internalLink">Lấy Entity Value old cũ sau đó Update không bị lỗi Asp.net MVC</a>]]></content:encoded>
      <slash:comments>4</slash:comments>
    </item>
    <item>
      <title>Custom 404 error is not redirecting to Global.asax in MVC C#</title>
      <pubDate>Fri, 03 Jul 2020 05:37:28 +0000</pubDate>
      <link>https://itseovn.com/threads/custom-404-error-is-not-redirecting-to-global-asax-in-mvc-c.319872/</link>
      <guid>https://itseovn.com/threads/custom-404-error-is-not-redirecting-to-global-asax-in-mvc-c.319872/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[HI mọi người, mình không thể Custom 404 error is not redirecting to Global.asax in MVC C# được, vì một số link nó không redirect về tập tin Global.asax Application_Error mà nó ra trang 404 mặc định của IIS.<br />
Mình muốn tất cả các all Requests phải được trả về redirect to Global.asax lệnh Application_Error thì làm như thế nào.<br />
Vì mình muốn 301 các liên kết lỗi về các dường dẫn chỉ định theo ý muốn ý.<br />
<br />
Mà hiện tại mình vào các liên kết có đuôi .html VD: /lien-ket/demo.hml thì nó không trùy cập...<br />
<br />
<a href="https://itseovn.com/threads/custom-404-error-is-not-redirecting-to-global-asax-in-mvc-c.319872/" class="internalLink">Custom 404 error is not redirecting to Global.asax in MVC C#</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Adding Cache-Control headers to Static Files Max-Age in MVC</title>
      <pubDate>Wed, 29 Apr 2020 15:59:49 +0000</pubDate>
      <link>https://itseovn.com/threads/adding-cache-control-headers-to-static-files-max-age-in-mvc.319445/</link>
      <guid>https://itseovn.com/threads/adding-cache-control-headers-to-static-files-max-age-in-mvc.319445/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Mình sử dụng công cụ kiểm tra tốc độ truy cập web của google thì bị lỗi: Phân phối các nội dung tĩnh bằng chính sách bộ nhớ đệm hiệu quả: Bộ nhớ đệm có thời gian hữu dụng dài có thể giúp tăng tốc số lượt truy cập lặp lại vào trang của bạn.<br />
<br />
Lỗi này mình tìm hiểu nói chỉ cần adding cache control deaders cho các file static, file tĩnh trong mvc c# asp.net mà mình không biết. Bạn nào biết chỉ mình với. <br />
<br />
Cảm ơn<br />


	<a href="https://itseovn.com/attachments/36672/" target="_blank">View attachment 36672</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Delete Multiple records with Entity Framework Linq ASP.Net MVC 5</title>
      <pubDate>Tue, 21 Apr 2020 06:37:42 +0000</pubDate>
      <link>https://itseovn.com/threads/delete-multiple-records-with-entity-framework-linq-asp-net-mvc-5.319187/</link>
      <guid>https://itseovn.com/threads/delete-multiple-records-with-entity-framework-linq-asp-net-mvc-5.319187/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Mình có 1 danh sách dữ liệu cần xóa, nếu xóa theo cách thông thường của LinQ thì phải duyệt hết mảng xóa từng phần tử khá lâu, bạn nào biết cách nào xóa 1 lúc nhiều phần tử 1 lúc cho nhanh không? Delete Multiple records with Entity Framework Linq ASP.Net MVC 5, xóa  nhanh tất cả các phần từ cần liệt kê trong danh sách chẳng hạn, xóa toàn bộ danh sách select lấy được từ Linq trả về]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Regex.Replace không phân biệt chữ hoa thường trong c#</title>
      <pubDate>Sun, 19 Apr 2020 01:08:29 +0000</pubDate>
      <link>https://itseovn.com/threads/regex-replace-khong-phan-biet-chu-hoa-thuong-trong-c.319075/</link>
      <guid>https://itseovn.com/threads/regex-replace-khong-phan-biet-chu-hoa-thuong-trong-c.319075/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Mình có code c# mvc asp.net về replace từ khóa sử dụng Regex, nhưng nó toàn bắt dưới dạng chính xác, giờ mính muốn nó bắt dạng không phân biệt chữ hoa chữ thường, và nó bắt ký tự đầu tiên thì làm như thế nào.<br />
<br />
Mình có code ở dưới. Có giải thích ở dưới, giờ làm sao cho nó replace cái đầu tiên không phân biệt chữ hoa chữ thường giúp, cảm ơn<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>protected void abctest()
{
    int countrp = 1;
    string keyrepfrom = &quot;từ khóa&quot;; //từ khóa cần tìm để replace
    string keyrpto = &quot;nội dung...</pre>
</div><a href="https://itseovn.com/threads/regex-replace-khong-phan-biet-chu-hoa-thuong-trong-c.319075/" class="internalLink">Regex.Replace không phân biệt chữ hoa thường trong c#</a>]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>Viết hoa duy nhất 1 ký tự đầu tiên chuỗi c# asp.net mvc như thế nào?</title>
      <pubDate>Tue, 14 Apr 2020 20:15:24 +0000</pubDate>
      <link>https://itseovn.com/threads/viet-hoa-duy-nhat-1-ky-tu-dau-tien-chuoi-c-asp-net-mvc-nhu-the-nao.318790/</link>
      <guid>https://itseovn.com/threads/viet-hoa-duy-nhat-1-ky-tu-dau-tien-chuoi-c-asp-net-mvc-nhu-the-nao.318790/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Xin hướng dẫn cách viết hoa duy nhất 1 ký tự đầu tiên chuỗi c# như thế nào? vậy mọi người, mình dùng code c# asp.net mvc. VD: mình có &quot;<b>từ viết ký tự đầu tiên</b>&quot; muốn chuyển thành:  &quot;<b>Từ viết ký tự đầu tiên</b>&quot; thì làm như thế nào? nghĩa là tất cả chỉ chuyển 1 ký tự đầu tiên thôi, các ký tự khác để nguyên như cũ. Cảm ơn]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Auto Keep Session Alive Timeout in MVC, tự động giữ thời gian sống session MVC</title>
      <pubDate>Wed, 08 Apr 2020 18:00:38 +0000</pubDate>
      <link>https://itseovn.com/threads/auto-keep-session-alive-timeout-in-mvc-tu-dong-giu-thoi-gian-song-session-mvc.318179/</link>
      <guid>https://itseovn.com/threads/auto-keep-session-alive-timeout-in-mvc-tu-dong-giu-thoi-gian-song-session-mvc.318179/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[<b>Việc giữ cho 1 session sống, hay Session Timeout tự động tăng và không bị chết session trong web MVC khá quan trọng, Auto Keep Session Alive Timeout in MVC, tự động giữ thời gian sống session MVC, Heartbeat to Keep Session Alive in ASP.NET MVC.</b><br />
<br />
Bạn rất bực mình khi đang thao tác viết bài thì bị mất session, cách xử lý code rất đơn giản như sau:<br />
<br />
<span style="color: #0000ff"><b><span style="font-size: 18px">Cách 1:</span></b></span><br />
<br />
<span style="color: #b30000"><b>Bước 1:</b></span> Tại HomeController.cs bạn thêm đoạn code sau:...<br />
<br />
<a href="https://itseovn.com/threads/auto-keep-session-alive-timeout-in-mvc-tu-dong-giu-thoi-gian-song-session-mvc.318179/" class="internalLink">Auto Keep Session Alive Timeout in MVC, tự động giữ thời gian sống session MVC</a>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Lấy id mã máy tính duy nhất trọn bộ trong c# mvc asp.net</title>
      <pubDate>Sat, 04 Apr 2020 04:36:03 +0000</pubDate>
      <link>https://itseovn.com/threads/lay-id-ma-may-tinh-duy-nhat-tron-bo-trong-c-mvc-asp-net.318061/</link>
      <guid>https://itseovn.com/threads/lay-id-ma-may-tinh-duy-nhat-tron-bo-trong-c-mvc-asp-net.318061/</guid>
      <author>invalid@example.com (admin)</author>
      <dc:creator>admin</dc:creator>
      <content:encoded><![CDATA[Việc lấy được mã máy của người dùng khi truy cập web rất quan trọng khi bạn thiết lập bảo mật dữ liệu người dùng truy cập trong mvc c# asp.net,..<br />
<br />
Để lấy được mã máy ID, thông tin BIOS, Win ID và tất tần tật máy tính của người truy cập bạn dùng lệnh sau:<br />
<b><br />
Đầu tiên bạn phải add thử viện vào using</b><br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>using System.Management;</pre>
</div><ul>
<li>Nếu bạn add vào bị lỗi, không tìm thấy ManagementObjectSearcher thì bạn truy cập vào</li>
<li>References -&gt; Add Reference ... -&gt; Assemblies -&gt;...</li>
</ul><br />
<a href="https://itseovn.com/threads/lay-id-ma-may-tinh-duy-nhat-tron-bo-trong-c-mvc-asp-net.318061/" class="internalLink">Lấy id mã máy tính duy nhất trọn bộ trong c# mvc asp.net</a>]]></content:encoded>
    </item>
    <item>
      <title>Xóa Cookie and delete all Cookie trong MVC asp.net c#</title>
      <pubDate>Fri, 03 Apr 2020 14:45:02 +0000</pubDate>
      <link>https://itseovn.com/threads/xoa-cookie-and-delete-all-cookie-trong-mvc-asp-net-c.318040/</link>
      <guid>https://itseovn.com/threads/xoa-cookie-and-delete-all-cookie-trong-mvc-asp-net-c.318040/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Mình đọc được cách xóa Cookie trong mvc c# rất đơn giản và dễ dàng, nay mình chia sẻ để bạn nào chưa biết thì sử dụng nhé.<br />
<br />
<b>Cách 1:</b><br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>
if (Request.Cookies[&quot;mycookie&quot;] != null)
{
    var infock = new HttpCookie( &quot;mycookie&quot; );
    infock.Expires = DateTime.Now.AddDays( -1 );
    Response.Cookies.Add( infock );
}
</pre>
</div><b>Cách 2: xóa toàn bộ</b><br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>
string[] myCookies = Request.Cookies.AllKeys;
foreach (string cookie in myCookies)
{
  Response.Cookies[cookie].Expires =...</pre>
</div><a href="https://itseovn.com/threads/xoa-cookie-and-delete-all-cookie-trong-mvc-asp-net-c.318040/" class="internalLink">Xóa Cookie and delete all Cookie trong MVC asp.net c#</a>]]></content:encoded>
    </item>
    <item>
      <title>Lỗi: The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities.</title>
      <pubDate>Fri, 27 Mar 2020 15:34:16 +0000</pubDate>
      <link>https://itseovn.com/threads/loi-the-linq-expression-node-type-arrayindex-is-not-supported-in-linq-to-entities.317597/</link>
      <guid>https://itseovn.com/threads/loi-the-linq-expression-node-type-arrayindex-is-not-supported-in-linq-to-entities.317597/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Mình đang bị lỗi như sau khi xử lý lấy dữ liệu db trong LINQ: The LINQ expression node type &#039;ArrayIndex&#039; is not supported in LINQ to Entities.<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>
string PrCode = &quot;MC1020_12&quot;;
string[] arrValue = PrCode.Split('_');
var model = db.Products.Where(p =&gt; p.ProductCode.Contains(arrValue[0].ToString())).ToList();
</pre>
</div><ul>
<li>Mình thấy lệnh mình đúng hết mà nó lại báo lỗi ArrayIndex not supported là sao nhỉ? Mình có View dữ liệu ra thì mảng vẫn có giá trị arrValue[0] = MC1020</li>
<li>Không hiểu...</li>
</ul><br />
<a href="https://itseovn.com/threads/loi-the-linq-expression-node-type-arrayindex-is-not-supported-in-linq-to-entities.317597/" class="internalLink">Lỗi: The LINQ expression node type &#039;ArrayIndex&#039; is not supported in LINQ to Entities.</a>]]></content:encoded>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>Cài đặt mặc định chạy debug về trang chủ home page trong visual studio MVC c#</title>
      <pubDate>Thu, 26 Mar 2020 03:47:57 +0000</pubDate>
      <link>https://itseovn.com/threads/cai-dat-mac-dinh-chay-debug-ve-trang-chu-home-page-trong-visual-studio-mvc-c.315794/</link>
      <guid>https://itseovn.com/threads/cai-dat-mac-dinh-chay-debug-ve-trang-chu-home-page-trong-visual-studio-mvc-c.315794/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Cài đặt mặc định chạy debug về trang chủ home page trong visual studio MVC c# như thế nào? bạn nào biết giúp mình với. Mình không biết set default debug mvc to home như thế nào? Mình click vào view home rồi click chuột phải vào index rồi chọn set default thì nó toàn hiện ra trang lỗi có chữ View vô hiccc, ngày xưa không xài MVC xài cách đó được, giờ qua MVC không biết làm sao.<br />
<br />
Mình muốn khi chạy Debug nó tự động vô trang chủ của web ý, hiện tại nó toàn vô trang lỗi không có:...<br />
<br />
<a href="https://itseovn.com/threads/cai-dat-mac-dinh-chay-debug-ve-trang-chu-home-page-trong-visual-studio-mvc-c.315794/" class="internalLink">Cài đặt mặc định chạy debug về trang chủ home page trong visual studio MVC c#</a>]]></content:encoded>
      <slash:comments>3</slash:comments>
    </item>
    <item>
      <title>Lấy giá trị Max và Min trong LINQ MVC C#, get value Min Max in LinQ MVC</title>
      <pubDate>Sun, 01 Mar 2020 18:47:27 +0000</pubDate>
      <link>https://itseovn.com/threads/lay-gia-tri-max-va-min-trong-linq-mvc-c-get-value-min-max-in-linq-mvc.315645/</link>
      <guid>https://itseovn.com/threads/lay-gia-tri-max-va-min-trong-linq-mvc-c-get-value-min-max-in-linq-mvc.315645/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Để lấy giá trị lớn nhất Max và giá trị nhỏ nhất Min trong MVC sử dụng Linq các bạn có các cách như sau: Ví dụ mình muốn lấy giá trị tiền lớn nhất và tiền nhỏ nhất UnitPrice không tính giá trị  giá bằng 0 hoặc nhỏ hơn 0 trong <a href="https://itseovn.com/forums/lap-trinh-sql-mysql/" class="keywordReplace">sql</a> table thông qua model List của dữ liệu trường sản phẩm Products thì các bạn làm như sau:<br />
<br />
<b>Cách 1:</b><br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre> 
var MaxPrice = DbContext.Products.Where(p=&gt;p.UnitPrice &gt; 0).Max(p =&gt; p.UnitPrice);
var MinPrice = DbContext.Products.Where(p=&gt;p.UnitPrice &gt; 0).Min(p =&gt;...</pre>
</div><a href="https://itseovn.com/threads/lay-gia-tri-max-va-min-trong-linq-mvc-c-get-value-min-max-in-linq-mvc.315645/" class="internalLink">Lấy giá trị Max và Min trong LINQ MVC C#, get value Min Max in LinQ MVC</a>]]></content:encoded>
    </item>
    <item>
      <title>The entity or complex type cannot be constructed in a LINQ to Entities query</title>
      <pubDate>Wed, 01 Jan 2020 14:41:09 +0000</pubDate>
      <link>https://itseovn.com/threads/the-entity-or-complex-type-cannot-be-constructed-in-a-linq-to-entities-query.310962/</link>
      <guid>https://itseovn.com/threads/the-entity-or-complex-type-cannot-be-constructed-in-a-linq-to-entities-query.310962/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Mình sử dụng code tìm kiếm autocomplete bằng MVC asp.net thì bị lỗi tìm kiếm như dưới, mình không hiểu lỗi là bị gì cả. Mình trả về data gồm Id, Name dưới dạng JsonResult ý.<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>var modelsearch = dbc.Products.Where(x =&gt; x.Name.Contains(search)).Select(x =&gt; new Product
            {
                Id = x.Id,
                Name = x.Name
            }).ToList();</pre>
</div>Bị lỗi:<br />
The entity or complex type &#039;MSPTNS.Models.Product&#039; cannot be constructed in a LINQ to Entities query...<br />
<br />
<a href="https://itseovn.com/threads/the-entity-or-complex-type-cannot-be-constructed-in-a-linq-to-entities-query.310962/" class="internalLink">The entity or complex type cannot be constructed in a LINQ to Entities query</a>]]></content:encoded>
      <slash:comments>3</slash:comments>
    </item>
    <item>
      <title>Dropdown get, set value in jquery như thế nào C# HMTL MVC ASP.NET</title>
      <pubDate>Mon, 30 Dec 2019 03:45:38 +0000</pubDate>
      <link>https://itseovn.com/threads/dropdown-get-set-value-in-jquery-nhu-the-nao-c-hmtl-mvc-asp-net.312254/</link>
      <guid>https://itseovn.com/threads/dropdown-get-set-value-in-jquery-nhu-the-nao-c-hmtl-mvc-asp-net.312254/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Mình có cái dropdown list dữ liệu hay còn gọi combobox ý, giờ muốn lấy (get) hoặc truyền (set) dữ liệu vào cho nó thì làm như thế trong jQuery hoặc javascript giúp mình với nhé.<br />
Cảm ơn<br />


<div class="bbCodeBlock bbCodeCode">
	<div class="type">Mã:</div>
	<pre>&lt;select id=&quot;ddNumber&quot;&gt;
     &lt;option value=&quot;&quot;&gt;Chọn&lt;/option&gt;
     &lt;option value=&quot;1&quot;&gt;12&lt;/option&gt;
     &lt;option value=&quot;2&quot;&gt;23&lt;/option&gt;
     &lt;option value=&quot;3&quot;&gt;34&lt;/option&gt;
     &lt;option value=&quot;4&quot;&gt;45&lt;/option&gt;
&lt;/select&gt;</pre>
</div>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Sự kiện Event Dropdown, Combobox onchange value thay đổi giá trị javascript jQuery</title>
      <pubDate>Mon, 30 Dec 2019 03:34:06 +0000</pubDate>
      <link>https://itseovn.com/threads/su-kien-event-dropdown-combobox-onchange-value-thay-doi-gia-tri-javascript-jquery.312253/</link>
      <guid>https://itseovn.com/threads/su-kien-event-dropdown-combobox-onchange-value-thay-doi-gia-tri-javascript-jquery.312253/</guid>
      <author>invalid@example.com (seolagi)</author>
      <dc:creator>seolagi</dc:creator>
      <content:encoded><![CDATA[Mình đang tìm code Sự kiện Event Dropdown, Combobox onchange value thay đổi giá trị trong javascript hoặc jQuery cho mình xin đoạn code với nhé.<br />


<div class="bbCodeBlock bbCodeHtml">
	<div class="type">HTML:</div>
	<pre>
&lt;select id=&quot;ddNumber&quot;&gt;
     &lt;option value=&quot;&quot;&gt;Chọn&lt;/option&gt;
     &lt;option value=&quot;1&quot;&gt;12&lt;/option&gt;
     &lt;option value=&quot;2&quot;&gt;23&lt;/option&gt;
     &lt;option value=&quot;3&quot;&gt;34&lt;/option&gt;
     &lt;option value=&quot;4&quot;&gt;45&lt;/option&gt;
&lt;/select&gt;</pre>
</div>]]></content:encoded>
      <slash:comments>1</slash:comments>
    </item>
  </channel>
</rss>
