Creating a Datagrid HyperLinkColumn with Multiple Querystring Values

Discussion in 'ASP .Net Datagrid Control' started by ogsubs@gmail.com, May 12, 2007.

  1. Guest

    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>

    =================
     
    , May 12, 2007
    #1
    1. Advertising

  2. Teemu Keiski Guest

    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





    <> wrote in message
    news:...
    > 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, May 12, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vtreddy
    Replies:
    0
    Views:
    2,065
    vtreddy
    Nov 6, 2003
  2. TJS
    Replies:
    2
    Views:
    2,262
  3. Roy
    Replies:
    1
    Views:
    1,295
  4. vtreddy

    Adding Multiple values to DataGrid HyperLinkColumn dynamically

    vtreddy, Nov 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    155
    vtreddy
    Nov 6, 2003
  5. Jimbo Jim

    additional HyperLinkColumn querystring values

    Jimbo Jim, Sep 28, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    141
    Jimbo Jim
    Sep 28, 2005
Loading...

Share This Page