is it possible to convert a guid 2 a string and then back into a guid ?
any help appreciated :)
Printable View
is it possible to convert a guid 2 a string and then back into a guid ?
any help appreciated :)
just keep 2 different varaibles. one guid and one string...although I dont see any real reason to needing a Guid object since it doesnt seem to have any methods or properties of importance except of course NewGuid
im developing a project that uses web forms as well as win forms and i need to pass a guid from one web form to another but cannot set a session variable to a guid they will only hold strings, i either need to know how to perform the above or find out how to pass guids in a web form
any help appreciated :)
to a string is easy
guidobject.tostring
there is no need to convert back to a guid.
but this means i cant initialize my supplier class on the next form when i try and set the guid on the supplier it say string cannot be converted to a guid
should i pass the supplier object instead of just the guid ?
hmm..dont know. perhaps if I saw the code, showing exactly what you are trying to accomplish I could think of something?!?!
there's no way 2 convert back into a guid, but what i did was to write a function within my class that u pass a string into (of the guid) and it searches down the db to find the guid and assigns it to the class !!
pure genius, well not really but at least it works !!! way hey ;)