By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,369 Members | 1,188 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,369 IT Pros & Developers. It's quick & easy.

linklabel, javascript and C Sharp

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.