actually i am having a gridview control in my page..in that gridview i displayed the employee details and i provide view link button for every column in that gridview..my doubt is whenever i click the view link button in the gridview,the employee id will be get and pass it to other page and retrive the values using that employee id ..how to use.?thanks in advance..i am using a code like this
<asp:TemplateField HeaderText ="View">
<ItemTemplate >
<asp:LinkButton ID="LinkButton1" runat="server" Text="View" PostBackUrl='<%#"~/Default.aspx?empid="+Eval("empid")%>'></asp:LinkButton>
</ItemTemplate>
when i click the view button it will go to default page but the records are not displayed in the textbox..this is my default.aspx.vb code
in page load
Dim empid As [String] = Request.QueryString("empid")
If empid = "" Then
'Response.Write("Invalid Employee ID")
Return
End If
cmd = New SqlCommand("select * from employeeregistration where empid='" + empid + "'", con)
con.Open()
da = New SqlDataAdapter(cmd)
dt.Clear()
da.Fill(dt)
If dt.Rows.Count > 0 Then
txtempid.Text = empid
txtfname.Text = dt.Rows(0)(1).ToString()
txtlname.Text = dt.Rows(0)(2).ToString()
txtpraddress.Text = dt.Rows(0)(3).ToString
txtperaddress.Text = dt.Rows(0)(4).ToString
but it will not works properly pls help me