Hi there,
A couple of things:
1. Please use the "Remove Text Formatting" button on the toolbar of the editor when posting here. Then wrap the text in code tags by using the code button. Otherwise, the code gets impossible to read.
2. Please provide more information. Like I said in my previous message, I need to know things like whether or not the items shows up in the database or not. Because of a bug in this forum I cannot use your code as-is (or at all, in fact), so it's difficult for me to reproduce the problem without more background information.
Then make sure you did the following:
1. Make Id a primary key in step 1
2. Enable inserting on the data source in step 6
3. Enable inserting on the FormView in step 7
4. Set the default mode to Insert.
If you confirmed all this and it still doesn't work, take a copy of this page from the download that comes with this book. Does it work then?
I also notice you have a proeprty called id. Is that correct? The table column was initially called Id with a capital I.
Finally, you seem to be missing an InsertVisible="False" on the Id column in the FormView. You should hide that control as it's auto generated by the database (maybe you did make it a primary but not an identity?)
Cheers,
Imar
|