Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. help requires in generating no and storing in backend

help requires in generating no and storing in backend

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelp
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kal13na13
    wrote on last edited by
    #1

    hi I want to generate a 10 digit number .I am selecting some details from one page submit it takes to me next page where i have to enter details in the form before entering the details a 10 didgit number appears on the page (automatically) after entering the detail if click submit the details along with nummber should stores in the backend I dont know the proper approach for this generating and storing value(asp.net withC#) can anyone have idea and help me out kal13na13

    R 1 Reply Last reply
    0
    • K kal13na13

      hi I want to generate a 10 digit number .I am selecting some details from one page submit it takes to me next page where i have to enter details in the form before entering the details a 10 didgit number appears on the page (automatically) after entering the detail if click submit the details along with nummber should stores in the backend I dont know the proper approach for this generating and storing value(asp.net withC#) can anyone have idea and help me out kal13na13

      R Offline
      R Offline
      RSArockiam
      wrote on last edited by
      #2

      If you want unique number then use this code DateTime.Now.ToString("yyyyMMddHH") Regards R.Arockiapathinathan

      K 1 Reply Last reply
      0
      • R RSArockiam

        If you want unique number then use this code DateTime.Now.ToString("yyyyMMddHH") Regards R.Arockiapathinathan

        K Offline
        K Offline
        kal13na13
        wrote on last edited by
        #3

        yes i want unique n sequential number but it is not but in this format '1000000001' not dat and time format . Any other way to achieve it

        R 1 Reply Last reply
        0
        • K kal13na13

          yes i want unique n sequential number but it is not but in this format '1000000001' not dat and time format . Any other way to achieve it

          R Offline
          R Offline
          RSArockiam
          wrote on last edited by
          #4

          You have to store this value in backend somewhere like a separate table and whenever you want to generate this number then get this value from this table and increase 1 and also update this table. I hope this will helpful to you. Regards R.Arockiapathinathan

          K 1 Reply Last reply
          0
          • R RSArockiam

            You have to store this value in backend somewhere like a separate table and whenever you want to generate this number then get this value from this table and increase 1 and also update this table. I hope this will helpful to you. Regards R.Arockiapathinathan

            K Offline
            K Offline
            kal13na13
            wrote on last edited by
            #5

            The number and details are to be stored in the same table for generation of numbers i am using the below code

            DataColumn col=new DataColumn("Number",typeof(System.String));
            col.AutoIncrement=true;
            col.AutoIncrementSeed =-1;
            col.AutoIncrementStep =-1;
            Label1.Text="Number is : + 'Number'";

            but not able to achieve the target of displaying the increasing order of the number Is the above code coreect for generation? Or any good sites for reference thanks in advance

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups