Last post May 20, 2009 11:27 PM by Allen Chen – MSFT
May 18, 2009 08:23 AM|Goldielocks|LINK
I have developed a custom control asp.net/jquery that I am now implementing. The custom control is a dialog that will pop up on a button click. The button won't post back until the user has clicked one of the buttons in the dialog (Yes/No/Cancel). To achieve
this I have used
This worked great until I implemented the dialog as a custom control. Now I get a null reference exception from the code below (line 2).
HiddenField postback = (HiddenField)JDialog.FindControl("postback");
postback.Value = Page.ClientScript.GetPostBackEventReference(button, string.Empty);
The only difference is that I cannot refer directly to the hiddenfield used for postback since it is inside the custom control. Using FindControl has nothing to do with the null reference though since it is thrown on line 2...
May 20, 2009 11:27 PM|Allen Chen – MSFT|LINK
Could you post a demo that can reproduce this problem?