Creating a Datagrid HyperLinkColumn with Multiple Querystring Values

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

  1. ogsubs

    ogsubs 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>

    =================
     
    ogsubs, May 12, 2007
    #1
    1. Advertisements

  2. ogsubs

    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, May 12, 2007
    #2
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.