471,337 Members | 1,041 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

Setting height and width of window opened by hyperlink

I am adding a hyperlink to a table and I want the hyperlink to open a
window with height and width I can set myself when it is clicked :

HyperLink hypGetExtractSQL = new HyperLink();

hypGetExtractSQL.Target = "_blank";
hypGetExtractSQL.ImageUrl =
"~/images/btnGetExtractSQL.jpg";
hypGetExtractSQL.NavigateUrl =
"~/secure/GetExtractSQL.aspx?guid=" + dr["CountID"].ToString();

htw.Write("</tr>");

pnlContent.Controls.Add(new
LiteralControl(sw.ToString()));

Is it possible to do this, or do I need to use a different approach?

*** Sent via Developersdex http://www.developersdex.com ***
Sep 12 '08 #1
1 2288
"Mike P" <mi*******@gmail.comwrote in message
news:OJ**************@TK2MSFTNGP03.phx.gbl...
>I am adding a hyperlink to a table and I want the hyperlink to open a
window with height and width I can set myself when it is clicked :

HyperLink hypGetExtractSQL = new HyperLink();

hypGetExtractSQL.Target = "_blank";
hypGetExtractSQL.ImageUrl =
"~/images/btnGetExtractSQL.jpg";
hypGetExtractSQL.NavigateUrl =
"~/secure/GetExtractSQL.aspx?guid=" + dr["CountID"].ToString();

htw.Write("</tr>");

pnlContent.Controls.Add(new
LiteralControl(sw.ToString()));

Is it possible to do this, or do I need to use a different approach?
Yes, you need a different approach. Instead of a hyperlink with
target=_blank, you will need to add a little bit of javascript to the
cient-side onclick event of the hyperlink. The javasript would be a
window.open(...), where one of the parameters lets you set (among other
things) the height and width of the opened window.

Sep 12 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Laura | last post: by
2 posts views Thread by Robson Carvalho Machado | last post: by
1 post views Thread by Nathan Sokalski | last post: by
3 posts views Thread by Annette Block | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.