You convert instead of casting. Try Convert.ToString()
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
"Jon Paal" <Jon nospam Paal @ everywhere dot com> wrote in message
news:e8**************@TK2MSFTNGP09.phx.gbl...
how do I set the cast in C# ?
Compiler Error Message: CS0266: Cannot implicitly convert type 'object' to
'string'. An explicit conversion exists (are you missing a cast?)
Source Error:
Line 6: string t =
System.Web.HttpContext.Current.Profile.GetProperty Value("SiteTheme");