473,503 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JS\Hyperlink

gh
I am using .net v 1.1. I use the code below to dynamically create a
cell with a hyperlink and assign the link information. When I click on
a link the window.open doesn' t fire. What am I missing?

cell.Width = "300";
string aID = ds.Tables[0].Rows[J]["ID"].ToString();
HyperLink aLink = new HyperLink();
aLink.CssClass = "directory";
aLink.ID = "HyperLink"+Convert.ToString(J);
aLink.Text = ds.Tables[0].Rows[J]["CONAME"].ToString();
aLink.NavigateUrl = "javascript:;";
aLink.Attributes.Add("onclick",
"window.open('membercard.aspx?ID="+aID+"','new '," +
"'height=275, width=600, status= no,resizable= no, scrollbars=no,
toolbar=no, menubar=no');");
TIA
Jun 27 '08 #1
1 1110
Please post the HTML produced by your code.
Just load it, then right-click on the page and select View Source. Post the
code for the whole page as this is often caused by an error somewhere else
on the page, such as an unclosed or self-closed <scripttag.

"gh" <gh@att.netwrote in message
news:Om**************@TK2MSFTNGP03.phx.gbl...
>I am using .net v 1.1. I use the code below to dynamically create a cell
with a hyperlink and assign the link information. When I click on a link
the window.open doesn' t fire. What am I missing?

cell.Width = "300";
string aID = ds.Tables[0].Rows[J]["ID"].ToString();
HyperLink aLink = new HyperLink();
aLink.CssClass = "directory";
aLink.ID = "HyperLink"+Convert.ToString(J);
aLink.Text = ds.Tables[0].Rows[J]["CONAME"].ToString();
aLink.NavigateUrl = "javascript:;";
aLink.Attributes.Add("onclick",
"window.open('membercard.aspx?ID="+aID+"','new '," +
"'height=275, width=600, status= no,resizable= no, scrollbars=no,
toolbar=no, menubar=no');");
TIA

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

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.