SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Feb 2008
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to genrate auto ID???

    hi to all,
    i m using asp.net express edition.
    i have a form on which ID field ,so when new user open this form new ID is assign to him .this ID will display with label in form corner.
    how i will do this pl z tell me...

  2. #2
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,873
    Mentioned
    44 Post(s)
    Tagged
    0 Thread(s)
    Hi

    This depends... what format ID? a number and group of numbers and letters a guid, etc

  3. #3
    SitePoint Guru Wullie's Avatar
    Join Date
    Oct 2002
    Location
    Greenock, Scotland
    Posts
    701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it is a GUID then use the guid types shared method NewID to generate a new ID.

    nameofform.Text = Guid.NewId().ToString()
    ASP.NET Freelance Web Developer
    Bored? Check out my photography folio at Flickr

  4. #4
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it's a numeric value to be used for internal purposes, you can have database do it for you. How exactly? Depends on a database server you're using.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •