Hyperlink Column

Discussion in 'ASP .Net Datagrid Control' started by Bishoy George, Jan 3, 2006.

  1. I have 2 columns in a Table in SQL database called LinkName , LinkURL.
    I put the 2 columns in a table in a dataset

    How to display the 2 columns in a datagrid as ONE column displaying the
    LinkName column and when the user clicks on the link name item it directs
    the user to its link url.

    Thanks.
     
    Bishoy George, Jan 3, 2006
    #1
    1. Advertising

  2. Bishoy George

    Ahmed Fouad Guest

    <asp:DataGrid id="MyDataGrid"
    BorderColor="black"
    BorderWidth="1"
    GridLines="Both"
    AutoGenerateColumns="false"
    runat="server">

    <HeaderStyle BackColor="#aaaadd"/>

    <Columns>

    <asp:HyperLinkColumn
    HeaderText="Click an Item"
    DataTextField="LinkName"
    DataNavigateUrlField="LinkUrl" />

    </Columns>

    </asp:DataGrid>


    "Bishoy George" <> wrote in message
    news:...
    >I have 2 columns in a Table in SQL database called LinkName , LinkURL.
    > I put the 2 columns in a table in a dataset
    >
    > How to display the 2 columns in a datagrid as ONE column displaying the
    > LinkName column and when the user clicks on the link name item it directs
    > the user to its link url.
    >
    > Thanks.
    >
     
    Ahmed Fouad, Jan 3, 2006
    #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. =?Utf-8?B?V2FyYW4=?=

    HyperLink Column and Button Column in a DataGrid

    =?Utf-8?B?V2FyYW4=?=, Aug 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    604
    =?Utf-8?B?V2FyYW4=?=
    Aug 9, 2005
  2. =?Utf-8?B?ZGF2aWQ=?=
    Replies:
    11
    Views:
    1,010
    deandany
    Jul 17, 2006
  3. davetichenor
    Replies:
    1
    Views:
    844
    Eliyahu Goldin
    Oct 30, 2006
  4. Keith G Hicks
    Replies:
    3
    Views:
    767
    Keith G Hicks
    Feb 18, 2008
  5. Dave
    Replies:
    0
    Views:
    957
Loading...

Share This Page