Results 11 - 15 of 473
29 May 2019 29 May 2019 0 Comments  2447 Views
Here Mudassar Ahmed Khan has explained with an example, how to open Page (View) in New Tab (Window) on Button Click in ASP.Net MVC Razor.

Button cannot be used to open Page (View) in New Tab (Window) and hence using JavaScript’s window.open function, the Page (View) will be opened in New Tab (Window) on Button Click in ASP.Net MVC Razor.
21 May 2019 21 May 2019 0 Comments  3170 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  1862 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  1351 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  1152 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.
Results 11 - 15 of 473