Open a Page in New Window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have created a web application. When the user presses a button, I want a
new Explorer window to be launched with the new page. Right now to move from
page to page I am using Server.Transfer but this api does not have a way to
open the link in a different browser window. Can any one tell me how I can
accomplish this?

Shreyash B. Patel
 
You can open new browser windows only on the client-side.

message Hi,
I have created a web application. When the user presses a button, I want a
new Explorer window to be launched with the new page. Right now to move from
page to page I am using Server.Transfer but this api does not have a way to
open the link in a different browser window. Can any one tell me how I can
accomplish this?

Shreyash B. Patel
 
I have a solution:

When you use a repeater - Control in ASPX you can use for example the
containing of a column of a database as a variable for the HTML Code.
Example: When you put this line in the ItemTemplate-section of the repeater:

<td><a href=<%# DataBinder.Eval(Container.DataItem, "pagetolounch") %>
target="_blank"><img src="images/info.gif" alt="Artikelinformation"
border="0"></td>

Then (because of target="_blank") the link will open a new browser - window
of the page contained in the column "pagetolounch".

You dont need a real database, you can use a DataTable - Object in memory to
realize this. See the examples in Visual Studio.

It´s up to you to decide if this solution is too complicated to realize only
for one button. For me it was a good solution, because I was using the
DataTable object showing some articles, each heaving an information - button
to show the article information on a new page.

I hope I could help you.
Greetings, Wolfgang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top