471,056 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,056 software developers and data experts.

FormView Question

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.

Mar 3 '06 #1
1 1277
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.

Mar 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jurgen Appelo | last post: by
2 posts views Thread by sck10 | last post: by
2 posts views Thread by sck10 | last post: by
1 post views Thread by Paulo | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.