IE popup i asp.net
Hvordan laver jeg en smart måde at lave en popup når der clikkes på en LinkButton.Jeg har denne her fremragende metode som desværre kun virker hvis anvender den på button's som jeg opretter dynamisk:
public void OpenPopUp(System.Web.UI.WebControls.WebControl opener, string PagePath, string windowName, int width, int height)
{
string clientScript;
string windowAttribs;
//Building Client side window attributes with width and height.//
//Also the the window will be positioned to the middle of the screen//
windowAttribs = "width=" + width + "px," + "height=" + height + "px," + "left=\'+((screen.width -" + width + ") / 2)+\'," + "top=\'+ (screen.height - " + height + ")/ 2+\'";
//***Building the client script- window.open, with additional parameters***///
//clientScript = "window.open(\'" + PagePath + "\',\'" + windowName + "\',\'" + windowAttribs + "\');return false;";
clientScript = "window.open('" + PagePath + "','" + windowName + "','" + windowAttribs + "');return false;";
//regiter the script to the clientside click event of the 'opener' control*****///
opener.Attributes.Add("onClick", clientScript);
}
Jeg har brug for en god og seriøs metode til at lave popups på min buttons.
