Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HyperLink Column for DataGrid control (WebForm ASP.NET)

1 view
Skip to first unread message

Pete

unread,
Nov 16, 2001, 5:03:41 PM11/16/01
to
I am trying to create a column in the DataGrid control that contains more
than 1 parameter in the querystring. I can get one parameter to work fine,
but cannot figure out how to add multiple parameters. The code I have below
is what works for 1 parameter in the QueryString.

Thanks,
Pete

<asp:HyperLinkColumn Target="_self" DataNavigateUrlField="ID"
DataNavigateUrlFormatString="eventpage.aspx?ID={0}"
DataTextField="Event_Date" HeaderText="Event Date"></asp:HyperLinkColumn>


David Yuan

unread,
Nov 19, 2001, 4:25:19 AM11/19/01
to
I am afraid that you can't do it with a HyperLinkColumn. You need to use a
TemplateColumn, and assign the link to it like this:

<asp:TemplateColumn HeaderText="URL" >
<ItemTemplate>
<a class="lnk" href='Dest.aspx?Param1=<%# Container.DataItem("Param1")
%>&Parem2=<%# Container.DataItem("param2") %></a>
</ItemTemplate>
</asp:TemplateColumn>

This posting is provided "AS IS" with no warranties, and confers no rights.

0 new messages