Showing a single Modal Popup Extender on Click of Multiple Controls.
-
I have a Modal Popup Extender which I show on two different Button click events i.e btnAddNew_Click() & having imgbtnNew as TargetControlID. the problem is I want Two of the Textboxes txtFullName & txtShortName to be Disabled or Visible false on imgbtnNew_Click() Where as Visible True on btnAddNew_Click() Can anyone help....
-
I have a Modal Popup Extender which I show on two different Button click events i.e btnAddNew_Click() & having imgbtnNew as TargetControlID. the problem is I want Two of the Textboxes txtFullName & txtShortName to be Disabled or Visible false on imgbtnNew_Click() Where as Visible True on btnAddNew_Click() Can anyone help....
I think you can ask the sender "sender" who fired the and called the function. I just used it a couple of days ago. You could of just Googled it to get the anwser.
string strID = ((System.Web.UI.Control) sender).ID;
{EDIT] or you can use the .OnClientClick to issue some javascript to change the display state of the textbox from block to none. The javascript is fake, and just meant to give you an idea of how to use OnClientClick
.OnClientClick = "var txtID = getElementByID('txtBox'); txtID.style.display = 'none'; return true;"