The formview fired event itemupdating

Hi I have 2 update buttons in my Form View ('Apply' and 'OK').I want both buttons to update the data source but the 'OK' button should redirect afterwards.This allows you to provide an event-handling method that performs a custom routine, such as HTML encoding the values of a record before inserting it in the data source, whenever this event occurs.

event is raised when a button within the Form View control is clicked.

We can register the scritp in the certain update button's update server event handler.

Since the client-side code will be executed after the page is rendering to client, all the server-side code will be executed as normal. And for client-side redirection, you can use window.= "new url" to do the work. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead This posting is provided "AS IS" with no warranties, and confers no rights. I'm not sure this will work for me as I may wish to use Server. I have discovered a more alarming problem with the Server-side redirect however: The exception thrown in the Object Data Source Inserted event does not stop the redirect in the Form View Item Inserted event. protected void ods Account_Inserted(object sender, Object Data Source Status Event Args e) // this still runs protected void fv Account_Item Inserted(object sender, Form View Inserted Event Args e) I find this very odd.

Is there a better or more appropriate technique I could use?

Thanks Andrew Hello Andrew, Is the redirect here means redirect the current page to another page/url? Client Script to dynamically regisgter a clientscript to do the redirection at client-side.

Search for the formview fired event itemupdating:

the formview fired event itemupdating-76the formview fired event itemupdating-14the formview fired event itemupdating-17the formview fired event itemupdating-11

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “the formview fired event itemupdating”

  1. More recently, researchers at Brigham & Women's Hospital in Boston found that blue light—the kind emitted by tablets, cell phone, e-readers and other devices—disrupts the body's natural circadian rhythms, making it harder to get a good night's rest.