Hi All,

I want to pass an id via querystring from a hyperlink in a datagrid. How can I do it? I wrote the following, but got an error "The server tag is not well formed"

<asp:HyperLink [B]NavigateUrl="~/users/matrix.aspx?Exercise=<%# DataBinder.Eval(Container.DataItem,"hid")%>"[/B] Text="Link" id = "lnkLink" runat="server"></asp:HyperLink>

Please help!

Thanks in advance,
Aditi

Okay I got it!

Here's what I did -

<asp:HyperLink NavigateUrl='<%# DataBinder.Eval(Container.DataItem,"hid","~/users/matrix.aspx?ExerciseId={0}" ) %>' Text="Link" id = "HyperLink1" runat="server"></asp:HyperLink>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.