Link to home
Start Free TrialLog in
Avatar of scm0sml
scm0sml

asked on

guid showing as 00000000-0000-0000-0000-000000000000 ?

hi,

im using guids.

when i try to view in debug or use response.write i only ever get:
00000000-0000-0000-0000-000000000000

i know the guid is working but how can i view its value?
Avatar of DrunkenELF
DrunkenELF
Flag of United Arab Emirates image

Use UUIDGEN or GUIDGEN to generate your own guid.

00000000-0000-0000-0000-000000000000
Null guid is just a placeholder.

Dim guidResult as String = System.Guid.NewGuid().ToString()

Open in new window

Avatar of HeoQue
HeoQue

the following vb.net code will generate a random guid:

Dim myGuid As Guid = Guid.NewGuid()

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of harwantgrewal
harwantgrewal
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scm0sml

ASKER

i didnt want to generate a new guid i juyst wanted to be able to view it as it wasnt showing up in code as anything other than the place holder.

harwantgrewals answer did the trick:
Guid _myGUID = new Guid("1088729d-124d-4d0e-b5f3-d9ac36d787bb"); replacing the guid with a string variable