Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
dear all,
 
I have webform with textfields & with submit button of person details.

My requirement is after clicking submit button person'id should automatically generate and it is incremented by 1 as new person submit his details.
 
please give the solution.
Posted 11-Oct-12 1:42am
Comments
Peeyush Pachaori at 11-Oct-12 10:27am
   
Do you want the person id to increment and save in database?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Make IDENTITY (Property)[^] of your column true, which you want to increment.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

For the requirement specified, with least information available in question, I think you need to use a non-volatile storage like DB.
You can have user or person table with auto-increment "id" field as primary key.
 
Use this id.
 
Thanks
Milind
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 CPallini 375
1 Sergey Alexandrovich Kryukov 370
2 BillWoodruff 314
3 George Jonsson 279
4 OriginalGriff 257
0 OriginalGriff 5,030
1 CPallini 4,115
2 Sergey Alexandrovich Kryukov 3,554
3 George Jonsson 2,826
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 11 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100