Popup window in ASP.NET
This following code will explain how to create popup window using ASP.NET
Create two webforms
Place a button in first webform and in the Page_Load of the first form write the following code.
//onclick attribute which denotes the client side script to be called
//window.open() is a method in the javascript which is used to open a
//new window,you can specify the width and height of the popup window.
//popup.aspx denotes the webform to be openend, you can specify your own url to be opened
protected void Page_Load(object sender, EventArgs e)
{
btnpop.Attributes.Add("onclick", "window.open('popup.aspx','','height=100,width=200');return false");
}
Regards,
Dharma
thanks for this
as far as im getting it
btnpop.Attributes.Add ->is for adding custom attribute in menefest
for btnpop.