doramail05
asked on
syntax error in asp.net hyperlink
syntax error found near
','questioncomment', 'resizable=no, ....
onwards.
','questioncomment', 'resizable=no, ....
onwards.
(e.Item.FindControl("hlcomment") as HyperLink).Attributes.Add("onclick", "somename=window.open('questioncomment.aspx?qid=" + (e.Item.FindControl("lblqid") as Label).Text +
"&qno=" + (e.Item.FindControl("lblqno") as Label).Text +
"&childid=" + (e.Item.FindControl("lblchildid") as Label).Text','questioncomment', 'resizable=no,scrollbars=yes,status=no,toolbar=yes,height=500,width=700,left=50,top=40'); somename.focus();return true;")";
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(e.Item.FindControl("hlcom ment") as HyperLink).Attributes.Add( "onclick", @"somename=window.open('qu estioncomm ent.aspx?q id=" + (e.Item.FindControl("lblqi d") as Label).Text +
@"&qno=" + (e.Item.FindControl("lblqn o") as Label).Text +
@"&childid=" + (e.Item.FindControl("lblch ildid") as Label).Text + "','questioncomment', 'resizable=no,scrollbars=y es,status= no,toolbar =yes,heigh t=500,widt h=700,left =50,top=40 '); somename.focus();return true;");
@"&qno=" + (e.Item.FindControl("lblqn
@"&childid=" + (e.Item.FindControl("lblch
ASKER
the hyperlink turns into normal text, but clickable to a specific setting browser windows.
(e.Item.FindControl("hlcomment") as HyperLink).Attributes.Add("onclick", @"somename=window.open('questioncomment.aspx?qid=" + (e.Item.FindControl("lblqid") as Label).Text +
@"&qno=" + (e.Item.FindControl("lblqno") as Label).Text +
@"&childid=" + (e.Item.FindControl("lblchildid") as Label).Text + "','questioncomment', 'resizable=no,scrollbars=yes,status=no,toolbar=yes,height=500,width=700,left=50,top=40'); somename.focus();return true;");
in the hyperlink definition add this code
hyperlink.NavigateURL="jav ascript:vo id(0)";
hyperlink.NavigateURL="jav
Raj
Open in new window