Covert string to System.Guid, how??

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
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,097
Latest member
RayE496148

Latest Threads

Top