resize a browser window in aspnet?

J

Jim Bancroft

Hi everyone,

I'm using an asp:hyperlink to create a new, blank browser window. Are there
any parameters in the hyperlink control I can use to set the new window's
dimensions, much like you often do with javascript? Or is there a way to do
it in the new page's page_load() method? Or, is there some other preferred
method? Thanks for any advice.

-Jim
 
C

Craig Deelsnyder

Hi everyone,

I'm using an asp:hyperlink to create a new, blank browser window. Are
there
any parameters in the hyperlink control I can use to set the new window's
dimensions, much like you often do with javascript? Or is there a way
to do
it in the new page's page_load() method? Or, is there some other
preferred
method? Thanks for any advice.

-Jim

Set the onclick attribute of the hyperlink to do the window.open like
normal. Something like:

[VB.NET]
myLink.Attributes("onclick") = "window.open(...);return false;"

Note the return false is added to stop the link from also opening the
location specified in the NavigateUrl/href....
 

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

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top