I have a form with a submit button. On clicking the submit button, i display a jqueryUI dialog with Confirm and Cancel. On clicking Confirm, I want to post back and call the submit button's event handler not the Page_Load event.
I have the following
HTML
<input type="submit" value="Submit" id="submit" runat="server" onclick="submit" />
JQuery
$("#dialog").dialog('option', 'buttons', {
"Confirm": function () {
$("#ctl01").submit();
},
"Cancel": function () {
$(this).dialog("close");
}
});
so far, this will call the page_load event because i am 'just' submitting the whole form.
Server side
protected void Page_Load(object sender, EventArgs e)
{
if(Page.IsPostBack)
result.Text += "hey post-back, we did it!";
}
protected void submit(object sender, EventArgs e)
{
result.Text += "hey, event handler! ";
}