href code

  • Thread starter Thread starter Konrad
  • Start date Start date
K

Konrad

Hi

How to write in c# href code so it looks in source

Slide - pokaz programu - Remonty firmy Delta Software

pls. look source of this link.
Thanks
 
this is link:

<a>href="#"
onclick="mywin001=openIT('KartyPracy_viewlet_swf.html',600,400,null,null,'my
win001',5,true,true,true);return false">Slide - pokaz programu - Remonty
firmy Delta Software</a>

I want tp use this link with datagrid and
have problems with #.

Thanks
Konrad
 
Konrad,

Unless it's a typo your link is formatted incorrectly. The link's
attributes should be inside the <a> tag like this:

<a href="#"
onclick="mywin001=openIT('KartyPracy_viewlet_swf.html',600,400,null,null,'my
win001',5,true,true,true);return false">Slide - pokaz programu - Remonty
firmy Delta Software</a>


--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Try placing "javascript:" in front like this:

<a href="#"
onclick="javascript:mywin001=openIt('KartyPracy_viewlet_swf.html',600,400,nu
ll,null,'mywin001',5,true,true,true);return false">Slide - pokaz programu -
Remonty firmy Delta Software</a>

(Sometimes "return false;" doesn't fire without it.)

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
And how to do that using only code behind.

S. Justin Gengo said:
Try placing "javascript:" in front like this:

<a href="#"
onclick="javascript:mywin001=openIt('KartyPracy_viewlet_swf.html',600,400,nu
ll,null,'mywin001',5,true,true,true);return false">Slide - pokaz programu -
Remonty firmy Delta Software</a>

(Sometimes "return false;" doesn't fire without it.)

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche

onclick="mywin001=openIT('KartyPracy_viewlet_swf.html',600,400,null,null,'my
onclick="mywin001=openIT('KartyPracy_viewlet_swf.html',600,400,null,null,'my
 
Konrad,

You can add attributes to any .Net object from the code behind by utilizing
the "Attributes" method:

MyLink.Attributes.Add("onClick",
onclick="javascript:mywin001=openIt'KartyPracy_viewlet_swf.html',600,400,nul
l,null,'mywin001',5,true,true,true);return false")

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Back
Top