If you have a server control(asp.net server control, Button) and on the click of button you want to call a jquery function, So tell me how you will call a jquery function without postback?
Submitted by: AdministratorASP.NET provides the OnClientClick property to handle button clicks. You can use this property on Button, LinkButton and ImageButton. The same OnClientClick property also allows you to cancel a postback.
So I can use OnClientClick property and Jquery function will return false.
Example:
Code:
<script type="text/javascript">
function callMe()
{
alert('Hello');
return false;
}
</script>
<asp:Button ID="Button1" runat="server" OnClientClick="return callMe();" Text="Button" />
Submitted by:
So I can use OnClientClick property and Jquery function will return false.
Example:
Code:
<script type="text/javascript">
function callMe()
{
alert('Hello');
return false;
}
</script>
<asp:Button ID="Button1" runat="server" OnClientClick="return callMe();" Text="Button" />
Submitted by:
Read Online JQuery Developer Job Interview Questions And Answers
Top JQuery Developer Questions
☺ | Explain jQuery? |
☺ | Why we need jQuery? |
☺ | What methods used to provide effects in JQuery? |
☺ | If you have a server control(asp.net server control, Button) and on the click of button you want to call a jquery function, So tell me how you will call a jquery function without postback? |
☺ | Explain jQuery connect? |
Top Scripting language Categories
☺ | AngularJS Interview Questions. |
☺ | Ext-JS Interview Questions. |
☺ | Dojo Interview Questions. |
☺ | Expert Developer JavaScript Interview Questions. |
☺ | jQuery Mobile Interview Questions. |