开发者

Calling one ModalPopupExtender from two different buttons?

开发者 https://www.devze.com 2022-12-20 03:16 出处:网络
I have a panel that is hooked up to a ModalPopupExtender but it can be called two different ways, by either adding a user (one button click) or editing a user (a totally different button click).The co

I have a panel that is hooked up to a ModalPopupExtender but it can be called two different ways, by either adding a user (one button click) or editing a user (a totally different button click). The controls on the panel never change, but they are all blank when adding, or they are binded to the data of the particular user being edited. What should I set the Ta开发者_高级运维rgetControlID attribute to when I have two different buttons that need to open the same panel as a modal window?


Instead of wiring it up via the ASPX markup, you can do it in the code behind of the button event.

protected void btnClick(object sender, Eventargs e) {
   ModalName.Show();
}


My recommendation is to have 2 modalpopupextenders, both using the same PopupControlID for the panel you want to display in both instances.

0

精彩评论

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