• 2.1k
  • 98
  • 107.7k

Fetch autoincremented value to textbox from database

Sep 28 2011 3:13 AM
I have created form empdetails where employee will enter his details like name,address etc the empid will be generated automatically in my case empid starts with 0001 i have created table with empid column made it as identity
when user clicks on the this form i have textbox empid this textbox should display this auto genereated id.

How can i do that i'm using sql server 2005 in asp.net using c#

Can any1 help me on this.

Answers (12)