I have two file in my project, the UserControlDefault.ascx and Default.aspx
in my Default.aspx i have a button (bt1) and an UpdatePanel (up1).
When i hit the bt1, I load dinamically the UserControlDefault.ascx.
Inside this UserControlDefault.ascx, I have a button and a TextBox, when I hit this button, my textbox receive the value "Text changed.";
My problem is that, the usercontrol's button click doesn't fire and the usercontrol disappears =(
If I set the UseSubmitBehavior to false, I get a javascript error =(
How can I do this?
ThanxHi,
Kerkhoff:
My problem is that, the usercontrol's button click doesn't fire and the usercontrol disappears =(
are you re-creating the user control every time the page is loaded? Once you add a dynamic control, you must re-instantiate it on every request.
Kerkhoff:
If I set the UseSubmitBehavior to false, I get a javascript error =(
probably the __doPostBack javascript function is not being dropped on the page. Put this statement in the Page_Load handler of your user control:
Page.ClientScript.GetPostBackEventReference(this, String.Empty);
Thanx man =D
this really works for me :)
No comments:
Post a Comment