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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top