Results 1 to 7 of 7

Thread: GUID's - Guid 2 String then String 2 Guid - Solved

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    Outer space
    Posts
    97

    GUID's - Guid 2 String then String 2 Guid - Solved

    is it possible to convert a guid 2 a string and then back into a guid ?

    any help appreciated
    Last edited by OptimusPrime; Jan 20th, 2003 at 05:00 AM.

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    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
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    Outer space
    Posts
    97
    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

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    to a string is easy

    guidobject.tostring

    there is no need to convert back to a guid.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    Outer space
    Posts
    97
    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 ?

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    hmm..dont know. perhaps if I saw the code, showing exactly what you are trying to accomplish I could think of something?!?!
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    Outer space
    Posts
    97

    Sorted

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width