Professional Web Applications Themes

Submitting form with a unique ID - ASP.NET General

Hi All, I'm looking for some information/code samples on how I can create a simple web form that includes an auto-generated Unique ID on the form. The form includes the following 3 fields (Unique ID, First Name and Last Name). I have a SQL Server 2000 back-end with the table created as follows: UniqueID - numeric (9) FirstName - varchar (50) LastName - varchar (50) Ideally I would like the user just to enter their First and Last Name and the form automatically creates a Unique ID for them. Once they type in their First/Last Name the user submits the ...

  1. #1

    Default Submitting form with a unique ID

    Hi All,

    I'm looking for some information/code samples on how I can create a
    simple web form that includes an auto-generated Unique ID on the form.

    The form includes the following 3 fields (Unique ID, First Name and
    Last Name). I have a SQL Server 2000 back-end with the table created
    as follows:

    UniqueID - numeric (9)
    FirstName - varchar (50)
    LastName - varchar (50)

    Ideally I would like the user just to enter their First and Last Name
    and the form automatically creates a Unique ID for them. Once they
    type in their First/Last Name the user submits the information to the
    database. I've managed to get the web form created so that it submits
    the First/Last Name successfully but I can't think how to create the
    Unique ID, ideally I'd like this to be based around the time/date of
    submittal.

    Any guidance would be much appreciated.

    Thanks

    Scott
    James Brown Guest

  2. #2

    Default Re: Submitting form with a unique ID

    James... If you declare an IDENTITY column, SQL will return a
    uniqueID upon INSERT. If you want to generate your own
    uniqueID you could do a concatenation of the MAC address of the
    client ethernet card plus a timestamp.

    Regards,
    Jeff
    >I've managed to get the web form created so that it submits
    the First/Last Name successfully but I can't think how to create the
    Unique ID, ideally I'd like this to be based around the time/date of
    submittal.<


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Jeff Louie Guest

  3. #3

    Default Re: Submitting form with a unique ID

    Using a system generated GUID is quick and easy, although kinda long.
    16 bytes minimum.



    "James Brown" <i.mwinning.com> wrote in message
    news:1f88a50b.0307051028.3caafaf1posting.google.c om...
    > Hi All,
    >
    > I'm looking for some information/code samples on how I can create a
    > simple web form that includes an auto-generated Unique ID on the form.
    >
    > The form includes the following 3 fields (Unique ID, First Name and
    > Last Name). I have a SQL Server 2000 back-end with the table created
    > as follows:
    >
    > UniqueID - numeric (9)
    > FirstName - varchar (50)
    > LastName - varchar (50)
    >
    > Ideally I would like the user just to enter their First and Last Name
    > and the form automatically creates a Unique ID for them. Once they
    > type in their First/Last Name the user submits the information to the
    > database. I've managed to get the web form created so that it submits
    > the First/Last Name successfully but I can't think how to create the
    > Unique ID, ideally I'd like this to be based around the time/date of
    > submittal.
    >
    > Any guidance would be much appreciated.
    >
    > Thanks
    >
    > Scott

    David Waz... Guest

Similar Threads

  1. Unique Form inserting into many tables using unique id
    By Gabo Navarro in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: September 16th, 06:25 PM
  2. after submitting form go to page . . . .
    By rmstvns in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: November 7th, 02:31 AM
  3. Submitting form
    By flexdummy in forum Macromedia Flex General Discussion
    Replies: 17
    Last Post: February 3rd, 07:39 AM
  4. Use PDf fill in form in Website and submitting form info.
    By Alexandre_L_Eveille@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 0
    Last Post: August 3rd, 09:26 PM
  5. Submitting Form Var Problem
    By Ralph Freshour in forum PHP Development
    Replies: 1
    Last Post: October 31st, 02:27 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139