开发者

multiple submit buttons from multiple custom controls messing up the postback in asp.net

I currently have a scenario where 开发者_StackOverflowi am including two custom controls into a page, where each custom control has a submit button. The submit button works as long as only one control is added to the page, but once the second control is loaded both of the submit buttons stop working, the control never goes to the submit_click method in the custom control.

Thanks.


you should be handling click events in your custom control class and not processing on submit.


You should try using the 'UpdatePanel' in case you have multiple controls which send data to the web server.

You should put both of your user controls in two separate Update Panels and so both will work and will also not break the functionality of either of the controls.

Hope this helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜