FormView Question

A

akylitis

Question regarding the use of a FormView control. All I need is the
ability to submit a form (insert a record) and return back a "Thank
You". I am defaulting the FormView to "Insert" mode
(InsertItemTemplate), but after the post I would like to put my Thank
You message in the ReadOnly template (ItemTemplate). I can't figure
out how to change modes once posted.
 
A

akylitis

Ok, after reading my question again, I think I need a new direction.
I'm no longer concerned about FormView modes. I'm sticking with my
original plan of defaulting to Insert mode, and redirecting the browser
response to another page. Yes, I'm new to .NET and am making great
headway using all these new controls but now I'm totally stumped. My
new question is this. How do I retrieve a database key that was
generated by the db?

I have a FormView that is bound to an ObjectDataSource which is bound
to a TableAdapter. The DB handles handle a unique key through an
AutoGenerator. I don't understand how to get back the key that
corresponds to the record that was just inserted. Is it available
through the TableAdapter, or the ObjectDataSource, or the FormView? Is
it automatically retrieved? Do I have to do a select on the generator,
then insert as the ID what was retrieved? Ughhh.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top