Formview itemupdating asp net

Since this particular challenge wasn't on my radar I provided him with a workable solution, but thought a better solution was possible.

This article provides a comprehensive solution for defining an edit template in a Form View. The Form View is a binding control like the Grid View, except where the Grid View shows multiple rows of data and the Form View shows one record at a time in a form layout.

The edit template contains a Drop Down List and the population, binding, and updating is all handled declaratively. After you complete the data source wizard the Form View will have controls added to it for the Item Template, Edit Item Template, and Insert Item Template.

It is the Edit Item Template you are interested in.

formview itemupdating asp net-44formview itemupdating asp net-26formview itemupdating asp net-54

I can't for the life of me figure out when On Item Updated gets fired. NET trying to learn it, so some of the things you see in this code might be purposely done the hard way (so I can better understand whats going on behind the scenes) Basically, I have a Grid View that is the master control that uses a formview as a detail. I thought I understood that the button would call Command="Update" which would fire Item Updating and then Item Updated.

Do I need something additional to fire Item Updated?

This is basically saying that if we've set a Select Method, an Update Method, or a Delete Method (these are string properties on the Form View) then return true, otherwise tell us if we've set an Insert Method.

An old friend of mine, Joe Shook, laughingly said, “you should read what other people write too once in a while.” Of course, he was right and naturally I do. I read almost everything I can get in my hands including technical books, blogs, and articles because I am surprised by the number of things I haven't mastered or that I still don't have a “best practices” sort of solution for. Thankfully I am still willing to stay up to 11 or 12 o'clock—used to be until the next morning—working out the details of what I don't know until I am happy with an answer.

A friend of mine actually asked me about this particular problem: what is a good way to bind a Drop Down List in a Form View.