Micro Niche Builder
Closed Thread
Results 1 to 4 of 4

Thread: how to put the hyperlink in datalist

  1. #1

    Thumbs up how to put the hyperlink in datalist

    please help me how to put the hyperlink control in the datalist control


  2. SEO Software

  3. #2

    Default

    to put hyperlink in datalist conrol, firstly click on the edit templates. then add hyperlink control within that. after that end the edit templates. Then goto source code and use databinder property. you will get the hyperlink vontrol and its link also.

  4. #3

    Arrow

    Quote Originally Posted by ruchi_patel View Post
    please help me how to put the hyperlink control in the datalist control
    hi.....
    just refer this link you will get the answer easily.......
    ASP.NET HyperLink Control

    it will sure help you....
    thanks....!!!

  5. #4

    Default

    Following code will help you...

    <%@ Import NameSpace="System.Data" %>
    <html>
    <head>
    <title>Hungry Minds Chapter 9...</title>
    <script language="C#" runat="server">
    DataSet ds = new DataSet();
    void Page_Load(Object sender, EventArgs e) {
    ds.ReadXml(Page.MapPath("data.xml")) ;
    BindData();
    if (Request.QueryString["birthday"] != null ) msg.Text = "Your birthday is
    in " + Request.QueryString["Birthday"];
    }
    void BindData() {
    HyperLink.DataSource = ds;
    HyperLink.DataBind();
    }
    </script>
    </head>
    <body>
    <img src="logo.gif">
    <br>
    <font face="verdana" size="5">DataGrid Example with the HyperLink Column...</font>
    <hr>
    <form method="post" runat="server">
    <aspataGrid
    ID="HyperLink"
    AutoGenerateColumns="false"
    ShowHeader="True"
    RunAt="server">
    <HeaderStyle
    BackColor="#6699cc" />
    <columns>
    <asp:HyperLinkColumn
    DataNavigateUrlFormatString="HyperLinkColumn.ASPX? Birthday={0}"
    DataNavigateUrlField="Birthday"
    DataTextField="Name"
    HeaderText="Name" />
    </columns>
    </aspataGrid>
    <asp:Label ID="msg" Runat="server" />
    </form>
    <hr>
    </body>
    </html>

Closed Thread

Similar Threads

  1. Mousehover effect on Hyperlink
    By nikon in forum HTML & CSS Help
    Replies: 10
    Last Post: 06-22-2009, 04:58 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts