Results 16 - 19 of 19
27 Jul 2018 27 Jul 2018 0 Comments  2337 Views
Here Mudassar Ahmed Khan has explained with an example, how to run (call) JavaScript function after PostBack of ASP.Net Button.

When the Button is clicked, PostBack happens and the Click event handler of the Button is called.

Inside the Click event handler, a call to the JavaScript function can be registered using RegisterStartupScript method of ClientScript class in ASP.Net.
05 Jul 2018 05 Jul 2018 0 Comments  6555 Views
Here Mudassar Ahmed Khan has explained with an example, how to display Confirmation Box (Dialog) before Form Submit in ASP.Net MVC Razor.

The JavaScript Confirmation Message Box (Dialog) will be displayed using jQuery by attaching a Submit event handler to the Form.

When the Submit button is clicked, the Confirmation Message Box (Dialog) with OK (Yes) and Cancel (No) buttons will be displayed, if the User clicks OK (Yes) button only then the Form will be submitted and the Controller’s Action method will be called.
05 Jul 2018 05 Jul 2018 0 Comments  5172 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement confirm before Submit on ASP.Net Button Click using JavaScript.

The JavaScript Confirmation Message Box will be displayed on Button Click using ClientScript.RegisterOnSubmitStatement function.

When the Button is clicked, the Confirmation Message Box with OK (Yes) and Cancel (No) buttons will be displayed, if the User clicks OK (Yes) button only then the Form will be submitted i.e. Click event will fire.
03 Nov 2017 01 Jan 2019 0 Comments  12172 Views
Here Mudassar Ahmed Khan has explained with an example, how to dynamically add (insert) Items (Options) to DropDownList i.e. HTML Select element on Button click using JavaScript.

The Items (Options) Text and Value parts will be dynamically fetched from TextBoxes and then the Items (Options) will be added to HTML DropDownList using plain JavaScript.
Results 16 - 19 of 19