I am basically trying to do what this article says. link text I am able to postback, but my handler is not getting hit. Any ideas?
Code Behind
protected void Page_Init(object sender, EventArgs e)
{
WireEvents();
}
private void WireEvents()
{
btnAuthOk.Click += new EventHandler(btnAuthOk_Click);
btnAuthOk.OnClientClick = string.Format("fnClickOK('{0}','{1}')", btnAuthOk.ClientID, string.Empty);
}
private void btnAuthOk_Click(object sender, EventArgs e)
{
DoSomeCodeHere();
}
Javascript & HTML
function fnClickOK(sender, e) {
__doPostBack(sender, e);
}
<p>To allow this payment to be processed, enter an authorized User ID and Password</p>
<p>User ID: <asp:TextBox runat="server" ID="txtAuthUser" CssClass="underlinedTextBox" Columns="8" />
<asp:Literal runat="server" ID="spauth" Text=" " />
Password : <asp:TextBox runat="server" ID="txtAuthPass" TextMode="Password" CssClass="underlinedTextBox" Columns="10" />
</p>
<asp:Button runat="server" ID="btnAuthOk" Text="Submit" CssClass="popupAuthButton" UseSubmitBehavior="false" />
</asp:Panel>
<cc1:ModalPopupExtender ID="authPE" runat="server" PopupControlID="popupAuth"
OkControlID="btnAuthOk" TargetControlID="hdnPopupTarget" BackgroundCssClass="modalBackground" />
Thanks for any help here...
Cheers, ~ck
PS Stack is mucking my html a bit as I don't know how to properly post HTML. Is someone can edit and fix, I appreciate it. :)