Results 1 - 5 of 461
20 May 2019 20 May 2019 0 Comments  32 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.
15 May 2019 15 May 2019 0 Comments  193 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  237 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  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  182 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.
Results 1 - 5 of 461