How to send multiple URL fields in Http Header using datagrid

Discussion in 'ASP .Net Datagrid Control' started by Kamal Ahmed, Jun 22, 2005.

  1. Kamal Ahmed

    Kamal Ahmed Guest

    Hi All,

    I have a problem with Asp.Net Datagrid. I have two 2 databound fields in
    Asp.Net Datagrid "Code" & "Name". I want to send values of both columns by
    clicking on (Code) URL field.
    e.g. Values should be sent to Http header like this:

    How is it possible ?

    Kamal Ahmed, Jun 22, 2005
    1. Advertisements

  2. Kamal Ahmed

    Elton Wang Guest

    You can have a HyperLinkColumn in the datagrid. Then in
    datagrid_ItemDataBound event, you can assign url with query string for the

    if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == case
    HyperLink link = (HyperLink)e.item.Cells[link_column_index].Controls[0];
    link.NavigateUrl = "/pagename.aspx?code=" +
    e.item.Cells[code_column_index].Text + "&name=" +


    Elton Wang
    Elton Wang, Jun 22, 2005
    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.