Generate autonumber

Generate autonumber for Add new category that take id automatically

Page 1 of 1

3 Replies - 2869 Views - Last Post: 25 February 2010 - 01:23 PM Rate Topic: -----

#1 Bhavika  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-February 10

Generate autonumber

Posted 24 February 2010 - 09:23 AM

i would like to generate autonumber for add new category or published new advertise how the id will be autimatically generate by the code
Is This A Good Question/Topic? 0
  • +

Replies To: Generate autonumber

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Re: Generate autonumber

Posted 24 February 2010 - 09:42 AM

Is this "autonumber" simply a random number or does it need to be unique? Also, does it need to be a number, or can it be something like a GUID?
Was This Post Helpful? 0
  • +
  • -

#3 ans2007kumar  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 67
  • Joined: 25-September 09

Re: Generate autonumber

Posted 25 February 2010 - 08:46 AM

View Posteclipsed4utoo, on 24 February 2010 - 08:42 AM, said:

Is this "autonumber" simply a random number or does it need to be unique? Also, does it need to be a number, or can it be something like a GUID?

i also need it but need to generate unique code and should include char lower or upper case not important
Was This Post Helpful? 0
  • +
  • -

#4 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Re: Generate autonumber

Posted 25 February 2010 - 01:23 PM

View Postans2007kumar, on 25 February 2010 - 10:46 AM, said:

View Posteclipsed4utoo, on 24 February 2010 - 08:42 AM, said:

Is this "autonumber" simply a random number or does it need to be unique? Also, does it need to be a number, or can it be something like a GUID?

i also need it but need to generate unique code and should include char lower or upper case not important


If I understand you correct, then you need to generate a unique "code" that includes characters. If so, then look into a GUID.

Guid myGuid = new Guid();
Response.Write(myGuid.ToString());


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1