473,408 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 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 2444
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Laura | last post by:
Hello, Newbie question: Does anyone know how to dynamically set the screen width in an applet? I have an applet that creates a horizontal bar menu on a webpage, and I would like the width to be...
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
2
by: Robson Carvalho Machado | last post by:
Dear friends, I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an 1px transparent image only to determine link position, but as I create this link dynamically I could not...
1
by: Nathan Sokalski | last post by:
I am using the ImageUrl property of the Hyperlink control to create a graphical Hyperlink. However, I want to change the size of the image I am using, but the generated HTML places the width/height...
14
by: rsearing | last post by:
I am new to HTML and will have to beg if this is obvious, but I am trying to design a table that looks like: ******************************** *----A------*------------------------*...
8
by: Andrus | last post by:
..NET 2 Winforms application. How to create new setting and set it default value in userSettings section of app.config file or overwrite existing setting value ? I found code below in this list...
2
by: ssmeshack | last post by:
Hai all, Im having problem to set minimum height to <td> tag. It only takes height only not min-height. Im ie7 browser and developing web based system in Visual Web Deveploper 2008 (C# .Net). ...
3
by: Annette Block | last post by:
I'm rather new in JavaScript, but I have some experience in php. I learned it's rather easy to open a window of a specified size with JavaScript, that you need to specify the opened file, but I...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.