Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

FormView control in ASP.NET 2.0

 
 
Craig
Guest
Posts: n/a
 
      12-27-2005
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


 
Reply With Quote
 
 
 
Reply

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 raypolee@gmail.com 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



Advertisments