can any one help me for this code.
i had created 2web page say home, employee and master page. on the mater page i want to show all the employee who are online now. for that i'm firing the query and i got the all the employee name through SqlDatareader.Now problem is i want to add the hyperlink which show it's name of the hyperlink and on navigationurl i'm passing the Id of elmpoyee and i'll redirect it to employee page.
plese help my website apriciate the guys
Thank you.

guys i got the solution. if any one want this then try it. first add 1 repeater control on the page and then i'ed added one hyperlink in taht repater like this.

<asp:Repeater ID="Repeater1" runat="server">
                            <ItemTemplate>
                            <asp:HyperLink ID="hyp1" runat="server" Text='<%# Eval("UserName") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:Repeater>

then i'm firing the query for finding the username and tkaen in the datatable and then i'm giving the repater a source that is datatable and binding.

Dim dt As New DataTable
        con = New SqlConnection(cons)
        con.Open()
        Dim rpt As String
        rpt = "Select UserName from Employee Where Avail=1"
        cmd = New SqlCommand(rpt, con)
        da = New SqlDataAdapter(cmd)
        da.Fill(dt)
        Me.Repeater1.DataSource = dt
        Me.Repeater1.DataBind()

it's simple and run the code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.