Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > FormView control in ASP.NET 2.0

Thread Tools

FormView control in ASP.NET 2.0

Posts: n/a
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??


Protected Sub FormView1_ItemUpdated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.FormViewUpdatedEventArgs ) Handles
'Trap Errors here

If e.Exception Is Nothing Then
Session("MessageText") = "Updated Successfully"
'Display friendly message to end user and techy user to me
If HttpContext.Current.Request.UserHostAddress = ""
Session("MessageText") = e.Exception.Message
Session("MessageText") = "Error processing page."
End If

e.ExceptionHandled = True
End If

End Sub

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
user control in formview control ASP .Net 0 08-08-2007 11:18 PM
Formview within Formview Chris ASP .Net 0 05-19-2007 04:12 PM
FormView/Repeater/ Eval(FormView data) David Thielen ASP .Net Web Controls 2 06-16-2006 07:56 PM
How to DataBind droplist control in FormView Control EditItem mode =?Utf-8?B?eXVjaGFuZw==?= ASP .Net 0 04-15-2006 01:35 AM
How can I use Wizard Control Inside of FormView Control? John R. Lewis ASP .Net 0 01-04-2006 11:39 PM