Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FormView Question

0 views
Skip to first unread message

akylitis

unread,
Mar 3, 2006, 3:49:28 PM3/3/06
to
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.

akylitis

unread,
Mar 3, 2006, 4:16:12 PM3/3/06
to
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.

0 new messages