|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Referring to a field name in a hyperlinkOkay, this might be dumb, but how do I do this? I knew how to do this
in classic ASP, i.e <a href="http://www.somelink.com/somepage.asp?id=<%rs("SOMEFIELD_ID")%>" But how do I do that, considering I have a sql datasource? > Okay, this might be dumb, but how do I do this? I knew how to do this in Where are you using it? Within a DataList / ListView etc?> classic ASP, i.e > > <a href="http://www.somelink.com/somepage.asp?id=<%rs("SOMEFIELD_ID")%>" > > But how do I do that, considering I have a sql datasource? Few errors in your code: 1. <% must be replaced by <%# if you are using within data bound control. 2. Don't use double quotes at both the places. I'd recommend using single quote for href. <a href='somepage.aspx?id=<%# ... %>' ... For a data bound control (like GridView or DetailsView), I'd suggest using HyperLink control as compared to lame anchor element: <asp:HyperLink NavigateUrl='somepage.aspx?id=<%# DataBinder.Eval(....) %>' .... -- Happy Hacking, Gaurav Vaish | http://www.mastergaurav.com http://www.edujinionline.com http://articles.edujinionline.com/webservices -------------------
Using ASP.NET 2.0's ImageMap Control
Control events - page life-cycle Treeview Styles Aren't working How to hide the "Edit" link in DetailsView via code? White strip showing up between two imagemaps ASP code Controls calling other controls problem - ASP.NET 2.0 UserControls in a different directory create webcontrols in aspx or aspx.cs DropDownList SelectedIndexChanged |
|||||||||||||||||||||||