tags:

views:

85

answers:

1

DetailsView1.DefaultMode = DetailsViewMode.Insert;

After inserting how can i Preview Data before Submitting/Inserting data in the table?

I know the code would be: DetailsView1.DefaultMode = DetailsViewMode.ReadOnly;

Where do I put this code BEFORE submitting/inserting data in the table?

A: 

Not totally clear on what you're asking.

If you are looking to inspect or modify data before it is inserted into the table you could look at the DetailsView.ItemInserting Event

The ItemInserting event is raised when an Insert button within a DetailsView control is clicked, but before the insert operation. This allows you to provide an event handler that performs a custom routine, such as canceling the insert operation, whenever this event occurs.

You can find further information at this MSDN link

Joe
hey :) thanks. You were clear what I am trying to do.
Kombucha
You could also add that events that end with "ing" get raised raised before, and events that end with "d" happen after. An example would be the sequence of databind events: Item.DataBinding -> Item.DataBound
Matt Briggs