To me this should be much easier, but I can't seem to retain the values that are put in the Insert template upon a validation failure or when the sql fails. This will prevent the user from having to retype everything agin in the event of a failure.
As you can see I am using the Sub Insert_Click and not using an insert through the wizard. so the fields are unbound textboxes on the form. There are 2 dropdowns that provide choices for the other fields.
Any help would be appreciated. I pasted in the code using the text only option becuase the format was getting messed up. I porboably need more background on why the fields are blanking out.
See Code below
Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
' Dim sqlparm As String
Dim con As Data.SqlClient.SqlConnection = Nothing
Dim cmd As Data.SqlClient.SqlCommand = Nothing
Dim dr As Data.SqlClient.SqlDataReader = Nothing
Dim sql As String = ""
Dim x As Integer
' Dim x As Integer
If CType(Me.fvwAppSecurityDetails.FindControl("CorpIDTextBox"), TextBox).Text = "" Then
Me.lblMessage.Text = "CorpID cannot be blank"
Else : Page.Session("CorpID&
View Complete Post