views:

44

answers:

1

I used standard drag and drop to put in a ASP ListView with editing enabled. The table is two columns, a GUID primary key, and a text string name. Null is not allowed for either.

When I edit a record (for the name column), I change its value (to a valid value) and press enter, it crashes with a Cannot insert NULL into column named "Name". However, if I do exactly the same, but instead of pressing enter I click update, it works fine.

I am new to ASP.NET. What am I missing?

A: 

I would guess that enter is triggering the default button on the page, probably not your update button.

Use tab to see the focus moving around the page, hit tab then shift+tab to go back, see where the focus is. Pressing that button/link should yield the same result with the null error, what's that button/link doing?

Nick Craver