Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

How to open a new window from a webform

  Asked By: Clifton    Date: Mar 04    Category: Asp.net    Views: 1711
  

When click on a server control button or linkbutton with redirecting
to other page, the new page will be opened on the same window. If I
want to have one of these controls to open the new page on a seperate
window, how do I do that?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Poppy Brown     Answered On: Mar 04

Please be more specific about what it is you are trying to do and
why. You could just use Click her to go to my redirect page  in a separate
browser window!

Keep in mind that ASP.NET is a server  framework that still sends
HTML to the client browser.

 
Answer #2    Answered By: Juanita Mason     Answered On: Mar 04

builder.cnet.com/.../?tag=st.cn.sr1.dir
is your bible as to what can be done.

 
Answer #3    Answered By: Khadeeja Malik     Answered On: Mar 04

You can do this in several ways, but I find the easiest
to be :

MainPagesLink.Attributes.Add("onclick", "javascript:window.open('" + "DataUpdates/MainPages.aspx" + "'," +

"'linkwindow', 'width=405,height=225')");

adding an attribute to the button  in your Page_Load or some other page

initialization method. This adds a client-side event handler to the rendered

html, and opens a new window  with DataUpdates/MainPages.aspx in it and a window size

of 'width=405,height=225'.

 
Didn't find what you were looking for? Find more on How to open a new window from a webform Or get search suggestion and latest updates.




Tagged: