New Additions
30 Nov 2021 30 Nov 2021 0 Comments  250 Views
ASP.Net  MVC  Email  Form  TinyMCE  Gmail
Here Mudassar Ahmed Khan has explained with an example, how to send email using Contact Us Form in ASP.Net MVC Razor.

The Contact Us Form contains some TextBox controls, a Rich TextBox and a FileUpload control to attach file.

When the Send Button is clicked, the values from the TextBox fields are embedded into HTML string and the HTML string is send as Email along with the Attachment in ASP.Net MVC Razor.
09 May 2009 27 Nov 2021 4 Comments  410357 Views
Here Mudassar Ahmed Khan has explained with an example, how to get Column names from a Database table in SQL Server.

This article will discuss two methods to get Column names from a Database table:
1. Using SQL Query
2. Using Stored Procedure
12 Sep 2010 26 Nov 2021 16 Comments  85898 Views
In this article Mudassar Ahmed Khan has explained with an example, how to prevent / avoid / stop duplicate (double) insertion of record on Page refresh in ASP.Net using C# and VB.Net.

Duplicate inserts or double updates occur when a Page is refreshed which causes Form re-submission and in turn causing re-execution of the last executed operation.
24 Nov 2021 26 Nov 2021 0 Comments  442 Views
Here Mudassar Ahmed Khan has explained with an example, how to prevent (avoid) duplicate (double) record insert into SQL Server Database in ASP.Net using C# and VB.Net.
20 Nov 2021 20 Nov 2021 0 Comments  421 Views
Here Mudassar Ahmed Khan has explained with an example, how to use Session inside Controller in ASP.Net MVC Razor.

This article will illustrate how to set values in Session object and retrieve values stored in Session object inside Controller in ASP.Net MVC Razor.
20 Nov 2021 20 Nov 2021 0 Comments  572 Views
ASP.Net  MVC  Session  Core
Here Mudassar Ahmed Khan has explained with an example, how to get Session ID in ASP.Net Core MVC.
20 Nov 2021 20 Nov 2021 0 Comments  409 Views
ASP.Net  MVC  Session  Core
Here Mudassar Ahmed Khan has explained with an example, how to display or access Session object inside view in ASP.Net Core MVC.
19 Nov 2021 19 Nov 2021 0 Comments  444 Views
ASP.Net  MVC  Session  Core
Here Mudassar Ahmed Khan has explained with an example, how to destroy, delete or remove Session objects in ASP.Net Core MVC.
18 Nov 2021 18 Nov 2021 0 Comments  502 Views
ASP.Net  MVC  Session  Core
Here Mudassar Ahmed Khan has explained with an example, how to get and set Session object (variable) in ASP.Net Core MVC.
18 Nov 2021 18 Nov 2021 0 Comments  473 Views
ASP.Net  MVC  Session  Core
Here Mudassar Ahmed Khan has explained, how to set Session Timeout value in ASP.Net Core application.

Unlike previous ASP.Net applications, the Session Timeout value is set inside the Startup.cs class in ASP.Net Core applications.
18 Nov 2021 18 Nov 2021 0 Comments  374 Views
ASP.Net  MVC  Session  Core
Here Mudassar Ahmed Khan has explained, how to access HttpContext.Current.Session in .Net Core application.

Unlike previous ASP.Net applications, the Session object is not available under the HttpContext.Current property, instead it is available in the HttpContext class in ASP.Net Core applications.
18 Nov 2021 18 Nov 2021 0 Comments  471 Views
ASP.Net  MVC  Session  Core
Here Mudassar Ahmed Khan has explained, how to solve the following error in ASP.Net Core.

System.InvalidOperationException: Session has not been configured for this application or request.

The above error occurs when Session state is used in ASP.Net Core application without configuring the application.

This article will illustrate how to configure and enable Session state in ASP.Net Core applications.
18 Nov 2021 18 Nov 2021 0 Comments  382 Views
Here Mudassar Ahmed Khan has explained, how to enable Session in ASP.Net Core.

By default, Session State is disabled in ASP.Net Core applications i.e. ASP.Net Core MVC and ASP.Net Core Razor Pages.

This article will cover the steps to enable Session Sate in ASP.Net Core applications.
08 Nov 2021 08 Nov 2021 0 Comments  768 Views
Here Mudassar Ahmed Khan has explained with an example, how to use WHILE LOOP in SQL Server (Transact-SQL).

The WHILE statement as used in various programming languages works in similar way in SQL Server. It is a control flow statement and it is used to perform iterations until the condition holds TRUE.
28 Oct 2021 28 Oct 2021 0 Comments  1071 Views
Here Mudassar Ahmed Khan has explained with an example, how to get HttpContext.Current.Session value in JavaScript or jQuery with ASP.Net.

Session object or Session variable is stored on Server and hence in order to get its value in JavaScript or jQuery, an AJAX call will be done to the Server Side method in ASP.Net using C# and VB.Net.
28 Oct 2021 28 Oct 2021 0 Comments  946 Views
Here Mudassar Ahmed Khan has explained with an example, how to display TextBox value in JavaScript Alert Box using jQuery.

When the Button is clicked, the TextBox value is displayed in the JavaScript Alert Box.
28 Oct 2021 28 Oct 2021 0 Comments  880 Views
Here Mudassar Ahmed Khan has explained with an example, how to get Session value in JavaScript in ASP.Net MVC Razor.

JavaScript is a Client Side language and hence directly it is not possible to get Session value in JavaScript.

Thus, the solution is to make an AJAX call using jQuery AJAX function and pass the value of JavaScript variable to a Controller and inside the Controller the value is retrieved from Session object in ASP.Net MVC Razor.
20 Oct 2021 21 Oct 2021 0 Comments  809 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) Session value from one Controller to another Controller in ASP.Net MVC Razor.
20 Oct 2021 20 Oct 2021 0 Comments  853 Views
Here Mudassar Ahmed Khan has explained with an example, how to get Session value inside Controller in ASP.Net MVC Razor.
16 Oct 2021 16 Oct 2021 0 Comments  1037 Views
Here Mudassar Ahmed Khan has explained with an example, how to use Browser Cookies in ASP.Net Core Razor Pages.

This article will also explain how to perform operations on Cookies i.e. reading values stored in Cookies, writing (saving) values in Cookies and also removing (deleting) Cookies in ASP.Net Core Razor Pages.
16 Oct 2021 16 Oct 2021 0 Comments  970 Views
Here Mudassar Ahmed Khan has explained why HttpContext.Current not working in ASP.Net Core Razor Pages and what is the alternative solution for using the functionality in ASP.Net Core Razor Pages.

Microsoft has permanently removed HttpContext.Current property from .Net Core and introduced a new interface IHttpContextAccessor for .Net Core.
10 Oct 2021 10 Oct 2021 0 Comments  996 Views
ASP.Net  Cookies  MVC  Core
Here Mudassar Ahmed Khan has explained with an example, how to use Browser Cookies in ASP.Net Core MVC.

This article will illustrate how to perform following operations on Cookies i.e. reading values stored in Cookies, writing (saving) values in Cookies and also removing (deleting) Cookies in ASP.Net Core MVC.
07 Oct 2021 07 Oct 2021 0 Comments  1067 Views
Here Mudassar Ahmed Khan has explained with an example, how to use Browser Cookies in ASP.Net MVC Razor.

This article will also explain how to perform operations on Cookies i.e. reading values stored in Cookies, writing (saving) values in Cookies and also removing (deleting) Cookies in ASP.Net MVC Razor.
06 Oct 2021 06 Oct 2021 0 Comments  1353 Views
ASP.Net  MVC  Core
Here Mudassar Ahmed Khan has explained why HttpContext.Current not working in ASP.Net Core and what is the alternative solution for using the functionality in ASP.Net Core.

Microsoft has permanently removed HttpContext.Current property from .Net Core and introduced a new interface IHttpContextAccessor for .Net Core.
24 Sep 2021 24 Sep 2021 0 Comments  1418 Views
Here Mudassar Ahmed Khan has explained with an example, how to get Total Record Count (Row Count) of Table when Paging in Stored Procedure using Common Table Expression (CTE) in SQL Server.