hyperlink: Open new window in vb.NET

hello:

im using hyperlink control and when the user clicks on the hyperlink i want to open a new popup window with all the properities of the window like height, width....

thanks.
service2001Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

service2001Author Commented:
i use this code but it does not give me hyperlink:

 HyperLink1.NavigateUrl = "javascript:var w=window.open('TestPage.aspx','', 'width=625,height=760,scrollbars=yes,resizeable=yes');"
0
gtmljscCommented:
I suggest you use a LinkButton instead, then in the click event of the link button, add the following:

Response.Write("<script>window.open('Testpage.aspx','testWindow','width=625,height=760,scrollbars=yes,resizeable=yes')</script>")
0
service2001Author Commented:
i can not use linkbutton its a requirement to use only hyperlink
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

platinumbayCommented:
You could build a WebCustomControl, inherit from the hyperlink control, and then use AddAttributesToRender to add javascript to the start 'a' tag.  You'd still be 'using' the Hyperlink Control.  Sounds like a school project?
0
service2001Author Commented:
is it so difficult? oh man
0
platinumbayCommented:
This PAQd item has some sample code for a WebCustomControl.  You should look through it, it's pretty self-explanitory, and it might just do the trick.  Basically, I would inherit from the Hyperlink control, and use the Click event handler.

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21216605.html#12651739
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.