HighTechTalks DotNet Forums  

Creating a Datagrid HyperLinkColumn with Multiple Querystring Values

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss Creating a Datagrid HyperLinkColumn with Multiple Querystring Values in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
ogsubs@gmail.com
 
Posts: n/a

Default Creating a Datagrid HyperLinkColumn with Multiple Querystring Values - 05-12-2007 , 08:44 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>

=================


Reply With Quote
  #2  
Old   
Teemu Keiski
 
Posts: n/a

Default Re: Creating a Datagrid HyperLinkColumn with Multiple Querystring Values - 05-12-2007 , 10:41 AM






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





<ogsubs (AT) gmail (DOT) com> wrote

Quote:
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

=================



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.