asp.net - Cast a string into Guid in VB.Net -


I have the grid "UserID", it should be filled with a session ("user id"), which is a string, but Formatted to completely convert a Guid

If I try this, "Type can not be converted to type string in the grid"

  New Gid as a slow user ID () If HttpContext.Current.Session ("UserID") isnot   

type "I'll try" type string type User id = HttpContext.Current.Session ("UserID") if there is nothing after this, then

This completely changes the string to the grid, But if this is not accessible outside of the statement

  If HttpContext.Current.Session ("UserID") IsNot nothing, new Guide (HttpContext) as DIIIDIDID if IFession statement Exclude UserID To define it, conditionally assign it    

< P> Try it with New code in the form of a slow user ID () If HttpContext.Current.Session ("UserID"), if anyone is confused then keep in mind That user id = "" "GUID." Unless my memory is failing, the Guid Contructor will generate an "empty" GUID. If you want to use a fresh grid

Comments