Jin Yong
Jin Yong

Reputation: 43768

Click on button to pop-up new window with passing URL in .net c# web application

I'm new in .net C#, just a question here. how can I click a button then it will pop-up a new window to display a page?

example: If I have a page test.aspx, how can I code in .net c# web application so that it will pop-up a new window to display this page?

Upvotes: 0

Views: 2109

Answers (5)

VIRA
VIRA

Reputation: 1504

if you use Open a new Window then it will opens in new window.

Upvotes: 0

gbs
gbs

Reputation: 7266

ASP.NET HyperLink Control is another way. You have access to it's properties on code-behind if you need to manipulate the Url programmatically.

Upvotes: 0

citronas
citronas

Reputation: 19365

If you want a nice looking solution, you can use a JavaScript implemenation called ColorBox http://colorpowered.com/colorbox/

You would render that second page as an Iframe inside a dialog / popup. See this example page http://colorpowered.com/colorbox/core/example5/index.html: Other Content Types -> Outside Webpage (Iframe)

Upvotes: 0

JustinStolle
JustinStolle

Reputation: 4410

There's nothing intrinsic with ASP.NET or C# that does this. You're still outputting Html, so the methods of doing such a thing in JavaScript or target="_blank" in a link will still work.

Upvotes: 1

SLaks
SLaks

Reputation: 887305

You can call window.open("test.aspx"); in Javascript.

Upvotes: 0

Related Questions