C
Craig
I am using the form view control in ASP.NET 2.0.
I am in the edit mode
I enter an alpha character in a numeric field
Click update and the event below traps and and handles the error.
The problem is the value for the textbox gets reset back to the original
value, I want it to stay until the user correcrs it. How do I do this??
Thanks
Protected Sub FormView1_ItemUpdated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.FormViewUpdatedEventArgs) Handles
FormView1.ItemUpdated
'Trap Errors here
If e.Exception Is Nothing Then
Session("MessageText") = "Updated Successfully"
Else
'Display friendly message to end user and techy user to me
locally
If HttpContext.Current.Request.UserHostAddress = "127.0.0.1"
Then
Session("MessageText") = e.Exception.Message
Else
Session("MessageText") = "Error processing page."
End If
e.ExceptionHandled = True
End If
End Sub
I am in the edit mode
I enter an alpha character in a numeric field
Click update and the event below traps and and handles the error.
The problem is the value for the textbox gets reset back to the original
value, I want it to stay until the user correcrs it. How do I do this??
Thanks
Protected Sub FormView1_ItemUpdated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.FormViewUpdatedEventArgs) Handles
FormView1.ItemUpdated
'Trap Errors here
If e.Exception Is Nothing Then
Session("MessageText") = "Updated Successfully"
Else
'Display friendly message to end user and techy user to me
locally
If HttpContext.Current.Request.UserHostAddress = "127.0.0.1"
Then
Session("MessageText") = e.Exception.Message
Else
Session("MessageText") = "Error processing page."
End If
e.ExceptionHandled = True
End If
End Sub