24 May 2019 24 May 2019 0 Comments  138 Views
Here Mudassar Ahmed Khan has explained with an example, how to store Model in Session inside Controller and display in View in ASP.Net MVC Razor.

This article will illustrate how to save Model object in Session variable inside Controller and then access it using Razor syntax inside View in ASP.Net MVC Razor.
23 May 2019 23 May 2019 0 Comments  153 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) data from Controller to View using Session in ASP.Net MVC Razor.
23 May 2019 23 May 2019 0 Comments  141 Views
Here Mudassar Ahmed Khan has explained a short tutorial with example on how to use Session in ASP.Net MVC Razor.

Session is derived from the HttpSessionStateBase class and is used for persisting data i.e. State Management across requests in ASP.Net MVC Razor.
22 May 2019 22 May 2019 0 Comments  195 Views
Here Mudassar Ahmed Khan has explained with an example, how to set Session variable using jQuery in ASP.Net using C# and VB.Net.

jQuery is a JavaScript library and JavaScript is a Client Side language and hence directly it is not possible to set Session variable in jQuery.

Thus, the solution is to make an AJAX call using jQuery AJAX and pass the value of JavaScript variable to a Web Method and inside the Web Method, the value will be set in Session variable in ASP.Net using C# and VB.Net .
21 May 2019 21 May 2019 0 Comments  199 Views
Here Mudassar Ahmed Khan has explained with an example, how to set Session variable in JavaScript using jQuery in ASP.Net MVC Razor.

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

Thus, the solution is to make an AJAX call using jQuery AJAX and pass the value of JavaScript variable to a Controller and inside the Controller the value will be set in Session variable in ASP.Net MVC Razor.
20 May 2019 20 May 2019 0 Comments  229 Views
Here Mudassar Ahmed Khan has explained with an example, how to set Session variable in JavaScript in ASP.Net using C# and VB.Net.

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

Thus, the solution is to make an AJAX call using XmlHttpRequest (XHR) and pass the value of JavaScript variable to a WebMethod and inside the WebMethod the value will be set in Session variable in ASP.Net using C# and VB.Net.
20 May 2019 20 May 2019 0 Comments  214 Views
Here Mudassar Ahmed Khan has explained with an example, how to enable and disable Button in GridView based on condition in ASP.Net using C# and VB.Net.

The Enabled property of the Button is set with an Inline Expression which compares the value of the column and based on the value, True or False value is returned which is used to enable or disable the Button respectively.
17 May 2019 17 May 2019 0 Comments  335 Views
Here Mudassar Ahmed Khan has explained with an example, how to show and hide Button in GridView based on condition in ASP.Net using C# and VB.Net.

The Visible property of the Button is set with an Inline Expression which compares the value of the column and based on the value, True or False value is returned which is used to show or hide the Button respectively.
16 May 2019 16 May 2019 0 Comments  364 Views
Here Mudassar Ahmed Khan has explained with an example, how to remove HyperLink when exporting GridView to Excel in ASP.Net using C# and VB.Net.

When the GridView TemplateField columns contain controls like HyperLink, TextBox, Button, LinkButton, RadioButton or CheckBox controls then such controls need to be replaced with Literal control and then the GridView is exported to Excel file in ASP.Net using C# and VB.Net.
16 May 2019 16 May 2019 0 Comments  346 Views
jQuery  HTML  Div  Image
Here Mudassar Ahmed Khan has explained with an example, how to build a simple Image Slider with Fade effect using jQuery.

In this Image Slider, the Background Image of HTML DIV will be automatically changed at certain period.

The URL of the Images will be stored in a JavaScript Array and then using JavaScript setInterval function, the Background Image of HTML DIV will be dynamically changed (swapped) periodically using jQuery.
21 May 2013 16 May 2019 2 Comments  33231 Views
Here Mudassar Ahmed Khan has explained with an example, how to export TemplateField columns of the ASP.Net GridView control to Excel file in ASP.Net using C# and VB.Net.

When the GridView TemplateField columns contain controls like HyperLink, TextBox, Button, LinkButton, RadioButton or CheckBox controls then such controls need to be replaced with Literal control and then the GridView is exported to Excel file in ASP.Net using C# and VB.Net.
04 Jun 2015 15 May 2019 1 Comments  35384 Views
jQuery  HTML  Div
Here Mudassar Ahmed Khan has explained with an example, how to change Background Image of HTML DIV with Fade In and Fade Out animation using jQuery.
15 May 2019 15 May 2019 0 Comments  322 Views
jQuery  HTML  Div  Image
Here Mudassar Ahmed Khan has explained with an example, how to automatically change Background Image of HTML DIV at certain period i.e. every 5 seconds using jQuery.

The URL of the Images will be stored in a JavaScript Array and then using JavaScript setInterval function, the Background Image of HTML DIV will be dynamically changed (swapped) every 5 seconds using jQuery.
15 May 2019 15 May 2019 0 Comments  264 Views
Here Mudassar Ahmed Khan has explained with an example, how to use the ngStorage module in AngularJS.

The ngStorage module is used to save and retrieve data from HTML5 LocalStorage and SessionStorage objects using AngularJS.
15 May 2019 15 May 2019 0 Comments  314 Views
Here Mudassar Ahmed Khan has explained with an example, how to save and retrieve data from HTML5 LocalStorage and SessionStorage objects using AngularJS.
15 May 2019 15 May 2019 0 Comments  291 Views
Here Mudassar Ahmed Khan has explained with an example, how to dynamically populate Year in DropDownList i.e. HTML SELECT element using jQuery.

Inside the jQuery document ready event handler, the DropDownList i.e. HTML SELECT element will be referenced and using a For Loop, one by one Year values will be appended to the DropDownList using jQuery.
15 May 2019 15 May 2019 0 Comments  255 Views
Here Mudassar Ahmed Khan has explained with an example, how to dynamically populate Year in DropDownList i.e. HTML SELECT element using JavaScript.

Inside the window.onload event handler, the DropDownList i.e. HTML SELECT element will be referenced and using a For Loop, one by one Year values will be appended to the DropDownList using JavaScript.
14 May 2019 14 May 2019 0 Comments  281 Views
Here Mudassar Ahmed Khan has explained with an example, how to redirect (go) back to Previous Page without Refresh using JavaScript.

It is NOT possible to redirect (go) back to Previous Page without refreshing as whenever Page is redirected there will always be a Page reload in browser i.e. old page will be removed and the new Page from Browser History will be loaded in Browser.
14 May 2019 14 May 2019 0 Comments  223 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) Parameters using HyperLink in HTML.

The HTML HyperLink will be assigned an OnClick event handler and when clicked, the value of the TextBox will be set in the HREF attribute of the HTML HyperLink using JavaScript.

When the HTML Anchor Link is clicked, the TextBox value will be passed to the other Page as QueryString parameter using JavaScript.
14 May 2019 14 May 2019 0 Comments  199 Views
Here Mudassar Ahmed Khan has explained with an example, how to redirect to Previous Page using JavaScript.

The HTML Anchor Link will be assigned an OnClick event handler and when clicked, it will be redirected to the Previous Page using history.back function in JavaScript.
14 May 2019 14 May 2019 0 Comments  240 Views
Here Mudassar Ahmed Khan has explained with an example, how to pass (send) TextBox value in HREF of Anchor Link in HTML.

The HTML Anchor Link will be assigned an OnClick event handler and when clicked, the value of the TextBox will be set in the HREF attribute of the HTML Anchor Link using JavaScript.

When the HTML Anchor Link is clicked, the TextBox value will be passed to the other Page as QueryString parameter.
10 May 2019 10 May 2019 0 Comments  348 Views
Here Mudassar Ahmed Khan has explained with an example, how to convert HTML to Word Document in Windows Forms (WinForms) Application using C# and VB.Net.

First a DataGridView will be populated with some data using DataTable and then an HTML Table will be generated using the values from the DataGridView and will be saved to a Folder (Directory).

Finally, the HTML File will be converted into a Word Document using Microsoft Office Interop Library and saved to a Folder (Directory) in Windows Forms (WinForms) Application using C# and VB.Net.
10 May 2019 10 May 2019 0 Comments  319 Views
Here Mudassar Ahmed Khan has explained with an example, how to convert (export) HTML to Word Document in ASP.Net MVC Razor.

First the Grid (Html Table) will be populated from database using Entity Framework.

When the Export Button is clicked, the HTML string will be sent to the Controller and will be downloaded as Word file in ASP.Net MVC Razor.
10 May 2019 10 May 2019 0 Comments  251 Views
Here Mudassar Ahmed Khan has explained with an example, how to export DataGridView to Word Document in Windows Forms (WinForms) Application using C# and VB.Net.

First a DataGridView will be populated with some data using DataTable and then an HTML Table will be generated using the values from the DataGridView and will be saved to a Folder (Directory).

Finally, the HTML File will be converted into a Word Document using Microsoft Office Interop Library and saved to a Folder (Directory) in Windows Forms (WinForms) Application using C# and VB.Net.
09 May 2019 09 May 2019 0 Comments  377 Views
Here Mudassar Ahmed Khan has explained with an example, how to create HTML File programmatically using C# and VB.Net.

First a Windows Form DataGridView will be populated with some data using DataTable and then an HTML Table will be generated using the values from the DataGridView.

Finally, the HTML Table in HTML string format will be saved to a Folder (Directory) as HTML File in Windows Forms (WinForms) Application using C# and VB.Net.