469,582 Members | 2,525 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,582 developers. It's quick & easy.

linklabel, javascript and C Sharp

Is it possible to use javascript within a link label link in C#?

I want to call up a web page from a link label but without any scroll
bars and have it a certain size. I am trying to use the
javascript:window.open

this.lbtnArrangeColumns.Links[0].LinkData =
"javascript:window.open('http://localhost/Test.aspx','access','width=600px,height=550px,scro llbars=no')";

private void Test(object sender,
System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{

System.Diagnostics.Process.Start(e.Link.LinkData.T oString());
}

However it opens a browser window with [Object] in it and then opens
my smaller custom window. Can any one tell me how to prevent it
opening the first browser window.

Thanks,

np
Nov 15 '05 #1
1 1899
I have tried this for some of my links, unfortuantely there is a piece
of functionality where I need process start to open the small window
as no link label is used.

Also were you able to superimpose the hyperlink over the winform
control so that it looks like it is part of the winform? I tried
messing about with Z-index but no good the winform is always in the
foreground so you can't see the hyperlink

Thanks in Advance,

Nick

"Sunil TG" <tg*****@hotmail.com> wrote in message news:<05****************************@phx.gbl>...
I too had the same problem. What i did to solve this
problem is, i deleted the server side linklabel, and
placed an ordinary hyperlink, and wrote javascript in the
aspx file, which nicely opened the smaller window.
-----Original Message-----
Is it possible to use javascript within a link label link

in C#?

I want to call up a web page from a link label but

without any scroll
bars and have it a certain size. I am trying to use the
javascript:window.open

this.lbtnArrangeColumns.Links[0].LinkData =
"javascript:window.open

('http://localhost/Test.aspx','access','width=600px,height=
550px,scrollbars=no')";

private void Test(object sender,
System.Windows.Forms.LinkLabelLinkClickedEventArg s e)
{

System.Diagnostics.Process.Start

(e.Link.LinkData.ToString());
}

However it opens a browser window with [Object] in it and

then opens
my smaller custom window. Can any one tell me how to

prevent it
opening the first browser window.

Thanks,

np
.

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by tota | last post: by
3 posts views Thread by vince | last post: by
reply views Thread by Suz | last post: by
1 post views Thread by Marcus Kwok | last post: by
2 posts views Thread by Terrance | last post: by
4 posts views Thread by David Veeneman | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.