Thursday, March 22, 2012

Open a Page in New Window

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. PatelThis is only available via javascript's window.Open();

Karl

"Shreyash B. Patel" <Shreyash B. Patel@.discussions.microsoft.com> wrote in
message news:E637E506-A949-40D7-9CE2-896FC4D70961@.microsoft.com...
> 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.

"Shreyash B. Patel" <Shreyash B. Patel@.discussions.microsoft.com> wrote in
message news:E637E506-A949-40D7-9CE2-896FC4D70961@.microsoft.com...
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="http://pics.10026.com/?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

--
Wenn du es eilig hast, gehe langsam. (Konfuzius)

"Shreyash B. Patel" wrote:

> 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

0 comments:

Post a Comment