Since no one answered me, it has taken me a while to get the answer.
Basically, what to do, if you want to use a FormView for its Select
capabilities, or for its Insert Capabilies, but not use the Update,
say, or Delete, is to make use of the corresponding event in the SQL
Datasource control OR the Formview Control (SqlDataSource1_Updating,
for example) and then use the "e" argument to cancel the event: But
before you cancel, you can do what you want with the information held
in the FormView's controls.
So, to cancel an Updating event:
protected void SqlDataSource1_Inserting(object sender,
SqlDataSourceCommandEventArgs e)
{
e.Cancel = true;
}
You can also do this on a GridView. After the Cancel the control might
need some adjusting, such as a DataBind, or setting the Mode back to
ReadOnly, or whatever.
David
>Is there a way to use the FormView for Selects, but let it post back
>for Inserts and Updates?
[quoted text clipped - 8 lines]
>Thanks,
>David