Covert string to System.Guid, how??

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

ASP.NET 2.0

I'm wondering how to convert a string into a System.Guid!

I have this code where I want to use the convert:
Message.DeleteMessage(hidden.Value);. Here DeleteMessage wants an argument
of type System.Guid, but the hidden.Value (HiddenField) has stored it as a
string. I need to convert the value of hidden.Value to a System.Guid for
this to compile, but how??

Any suggestions?`

Jeff
 
Jeff said:
ASP.NET 2.0

I'm wondering how to convert a string into a System.Guid!

I have this code where I want to use the convert:
Message.DeleteMessage(hidden.Value);. Here DeleteMessage wants an argument
of type System.Guid, but the hidden.Value (HiddenField) has stored it as a
string. I need to convert the value of hidden.Value to a System.Guid for
this to compile, but how??

Any suggestions?`

Jeff

Have you tried:

new Guid(hidden.Value)
 
Back
Top