adding asp.net user control dynamically using Jquery problem
I am adding asp.net user control through jquery on a button click in main form dynamically. i have successfully added that control to my main page. but issue is that my control contains a butto开发者_如何学编程n in it and whenever i click on that button that cause the whole page to reload and hence my control is washed away.
can somebody tell me where am i going wrong and what i need to do. i just need to perform certain actions on button click of the control. can i stop the page to reload or how can i render my control again in main page whenever page is refreshed??
thanx
You'll have to reinitialize the control every time after a postback, using something like ScriptManager's RegisterStartupScript().
精彩评论