Groups | Blog | Home
all groups > asp.net datagrid control > may 2007 >

asp.net datagrid control : Creating a Datagrid HyperLinkColumn with Multiple Querystring Values



ogsubs NO[at]SPAM gmail.com
5/12/2007 5:44:25 AM
I'm trying to concatenates to mutli items on a query string...kept
generating errors...can u spot the bug?

===============
<ItemTemplate>
<asp:HyperLink id=Hyperlink1 runat="server" Text="Details"
NavigateUrl='<%
# "ClassList.aspx?
section_id="Container.DataItem("section_id")"
& "course_code="Container.DataItem("course_code")" %>'>
</asp:HyperLink>
</ItemTemplate>

=================
Teemu Keiski
5/12/2007 5:41:30 PM
It would be cleaner to do that within a helper function or in RowDataBound
(ItemDataBound) event if you want/need to do it that way (in code).

In ASP.NET 2.0 you can use HyperLinkField with GridView which supports it,
multiple fileds to be appended into qs, cleanly (declaratively)

--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net





[quoted text, click to view]
AddThis Social Bookmark Button