Manage Foreign key and Drop downlist for optional field in .NET

Posted by Brij on Stack Overflow See other posts from Stack Overflow or by Brij
Published on 2010-03-23T09:11:50Z Indexed on 2010/03/23 9:23 UTC
Read the original article Hit count: 374

Filed under:
|
|
|
|

What is the best way to handle following situation?

A dropdown(for master table) is optional in a particular form. But, In database table the field is constrained with foreign key. If user don't select from dropdown then It creates problem because of foreign key.

One solution is to create default option in master table and use it in case of blank selection. but in dropdown, we need to handle this to show on top. Is it perfect solution? Is there any other optimized solution for this?

Thanks

© Stack Overflow or respective owner

Related posts about foreign-key

Related posts about sql