How do I edit a record using a DataGrid
<p>In asp.net, In the datagridview, one hyperlinkfield is added Named Edit, when user clicks on this Edit, One webform page will be displayed and the user can be edited the entered record..</p>

<p>But my problem is that webform page is displayed but the record cannot be edited, i.e the entered record is not displayed.   I used query string also
What is the problem?</p>

<p>pliz help me</p>

<pre><code>Partial Public Class Detail
    Inherits System.Web.UI.Page
    Dim con As New SqlConnection("Integrated Security=true;Initial Catalog=DbExternal;Data Source=HP-EB39912FD43F")
    Dim cmdInsert As New SqlCommand
    Dim cmdUpd As New SqlCommand

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            If Not String.IsNullOrEmpty(Request.QueryString("ID")) Then
                HiddenID.Value = Request.QueryString("ID") 
                ddlDept.DataBind()
                ddlSpecial1.DataBind()
                DisplayExternalDetails()
            Else
                HiddenID.Value = -1 
            End If

        End If

    End Sub
</code></pre>
