What does webform_DoPostBackWithOptions() do?

Viewed 69442

I have a button declared like this:

<asp:Button id=Send runat="server" EnableViewState="False" 
ToolTip="Email me this report" CssClass="Button" Text="Email me this report">
</asp:Button>

But if I do Inspect Element in browser, it shows like this:

<input type="submit" class="Button" title="Email me this report" 
id="ctl03_Toolbar_Send" onclick="javascript:WebForm_DoPostBackWithOptions(new 
WebForm_PostBackOptions("ctl03$Toolbar$Send","", true, "", "";, false, false))" 
value="Email me this report" name="ctl03$Toolbar$Send">

I wonder where the onclick event comes from? What does it do?

Thanks for your help in advance.

4 Answers

Also if there is some validation control on the page this can cause it as well. Set the CausesValidation property of the button to false.

     <asp:button runat="server" ID="test" CausesValidation ="false" />
Related