HyperlinkColumn

Discussion in 'ASP .Net Datagrid Control' started by Matt, Sep 17, 2003.

  1. Matt

    Matt Guest

    Does anyone have know if it's possible to include multiple args in the
    NavigateURLFormatString property? The only examples I've seen are:
    DataNavigateUrlFormatString="detailspage.aspx?id={0}"
    Matt, Sep 17, 2003
    #1
    1. Advertising

  2. Yes it's possible...I do it a loop this way

    HyperLink link2 = new HyperLink();

    link2.Text = "My Link";
    link2.NavigateURL = "/MyPath/Default.aspx?";

    //queryString is a Hashtable
    foreach (string var in queryString.Keys)
    {
    if(var != "sortBy")
    link2.NavigateUrl += var +"="+
    HttpUtility.UrlEncode(queryString[var].ToString()) +"&";
    }

    link2.NavigateUrl += "sortBy="+ column +"+DESC";

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Jason Baldwin, Sep 17, 2003
    #2
    1. Advertising

  3. Matt

    Saravana Guest

    check out this,
    <asp:DataGrid id="DataGrid1" AutoGenerateColumns="False" style="Z-INDEX:
    101; LEFT: 66px; POSITION: absolute; TOP: 79px" runat="server">

    <Columns>

    <asp:TemplateColumn HeaderText="Order">

    <ItemTemplate>

    <asp:Hyperlink runat="server"
    Text='<%#DataBinder.Eval(Container.DataItem,"OrderID")%>' NavigateUrl='<%#
    "page.aspx?Orderid=" + DataBinder.Eval(Container.DataItem,"Orderid") +
    "&ProductID=" + DataBinder.Eval(Container.DataItem,"ProductID")%>'
    ID="Hyperlink1" NAME="Hyperlink1"/>

    </ItemTemplate>

    </asp:TemplateColumn>

    </Columns>

    </asp:DataGrid>



    --
    Saravana
    Microsoft India Community Star,MC**
    www.extremeexperts.com



    "Matt" <> wrote in message
    news:eRy$...
    > Does anyone have know if it's possible to include multiple args in the
    > NavigateURLFormatString property? The only examples I've seen are:
    > DataNavigateUrlFormatString="detailspage.aspx?id={0}"
    >
    >
    Saravana, Sep 18, 2003
    #3
    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. Dmitri Manushin

    send more than 1 parametr from hyperLinkColumn?

    Dmitri Manushin, Aug 13, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    591
    Dmitri Manushin
    Aug 13, 2003
  2. SStory
    Replies:
    3
    Views:
    2,412
    SStory
    Oct 30, 2003
  3. Morten
    Replies:
    3
    Views:
    1,526
    Morten
    Nov 3, 2003
  4. vtreddy
    Replies:
    0
    Views:
    2,053
    vtreddy
    Nov 6, 2003
  5. Maziar Aflatoun

    asp:HyperLinkColumn question

    Maziar Aflatoun, Nov 24, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    382
    Chris Jackson
    Nov 24, 2003
Loading...

Share This Page