开发者

User control not retaining property values

I have a very simple user control with 5 radio buttons on it, and 3 properties (ID, RatingSetID, and Rating). On the initial load of the 开发者_运维技巧page they are on, the code acquires data and places the data into the 3 properties. However, when the submit button is clicked the page reloads and the 3 properties get reset to 0, they are in the !IsPostBack as well. I know I am missing something simple.

Can anyone help?


The usercontrol might be reloaded when postback if you load this control on the fly


The user control get reload when the postback happens. You can place it into an UpdatePanel it could solve your problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜