20 May 2019 20 May 2019 0 Comments  36 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  27 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  271 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  277 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  245 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  33180 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  35279 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  248 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  223 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  251 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  246 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  195 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  239 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  191 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  166 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  183 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  300 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  268 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  216 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  314 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.
09 May 2019 09 May 2019 0 Comments  258 Views
Here Mudassar Ahmed Khan has explained with an example, how to create HTML File in Console (Command) Application using C# and VB.Net.

First, an HTML Table will be generated in the form of an HTML string and then the HTML string will be written to an HTML File and saved in Folder (Directory) using C# and VB.Net.
03 May 2019 03 May 2019 0 Comments  475 Views
Here Mudassar Ahmed Khan has explained with an example, how to redirect to another Page with multiple Parameters using jQuery.

The multiple values to be passed to another Page will be added to the URL as QueryString parameters and then the Page will be redirected to another Page using JavaScript window.location property in jQuery.
03 May 2019 03 May 2019 0 Comments  325 Views
Here Mudassar Ahmed Khan has explained with an example, how to redirect to another Page on Button Click using jQuery.

When the Send Button is clicked, the multiple values to be passed to another Page will be added to the URL as QueryString parameters and then the Page will be redirected to another Page using JavaScript window.location property in jQuery.
03 May 2019 03 May 2019 0 Comments  334 Views
Here Mudassar Ahmed Khan has explained with an example, how to redirect from one Page to another on Button Click in HTML.

HTML Button cannot perform redirect similar to a HyperLink and hence using JavaScript a Click event handler is attached to the Button and then using JavaScript window.location property Page will be redirected to another Page.
03 May 2019 03 May 2019 0 Comments  261 Views
Here Mudassar Ahmed Khan has explained with an example, how to redirect to another Page on Button Click using JavaScript.

When the Send Button is clicked, the multiple values to be passed to another Page will be added to the URL as QueryString parameters and then the Page will be redirected to another Page using window.location property in JavaScript.