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.
精彩评论