J
Jim Coyne
Is there a way to have the data controls re-populated with the previous data
if an error was encountered during an insert?
I currently have the following code to display the error message, but would
like to re-populate the data:
Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DetailsViewInsertedEventArgs)
If (Not e.Exception Is Nothing) Then
lblStatus.Text = "ERROR: Data not saved."
lblErrorMessage.Text = e.Exception.Message
e.ExceptionHandled = True
Else
Response.Redirect("Default.aspx")
End If
End Sub
I know the user can press "Back" to get the data, but that is not very
user-friendly.
Thanks
Jim
if an error was encountered during an insert?
I currently have the following code to display the error message, but would
like to re-populate the data:
Protected Sub DetailsView1_ItemInserted(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DetailsViewInsertedEventArgs)
If (Not e.Exception Is Nothing) Then
lblStatus.Text = "ERROR: Data not saved."
lblErrorMessage.Text = e.Exception.Message
e.ExceptionHandled = True
Else
Response.Redirect("Default.aspx")
End If
End Sub
I know the user can press "Back" to get the data, but that is not very
user-friendly.
Thanks
Jim