J
Jeff Johnson
I'm making the move from classic ASP to .NET.
I've got a getUserGUID method that I've rewritten in C#. I used to use
includes to access this function.
I've created a new class with this method, but I keep getting an "The type
or namespace name 'Request' could not be found" error.
Here's the method:
public class userFunctions
{
public string getUserGUID()
{
string sGUID =
Request.Cookies[ConfigurationSettings.AppSettings["GUID_NAME"]].Value;
if (sGUID == "")
{
HttpCookie UserGUIDCookie = new HttpCookie("UserGUID");
sGUID = System.Guid.NewGuid().ToString().Replace("{", "").Replace("-",
"").Replace("}", "");
UserGUIDCookie.Value = sGUID;
Response.Cookies.Add(UserGUIDCookie);
}
return sGUID;
}
}
Thanks,
JJ
I've got a getUserGUID method that I've rewritten in C#. I used to use
includes to access this function.
I've created a new class with this method, but I keep getting an "The type
or namespace name 'Request' could not be found" error.
Here's the method:
public class userFunctions
{
public string getUserGUID()
{
string sGUID =
Request.Cookies[ConfigurationSettings.AppSettings["GUID_NAME"]].Value;
if (sGUID == "")
{
HttpCookie UserGUIDCookie = new HttpCookie("UserGUID");
sGUID = System.Guid.NewGuid().ToString().Replace("{", "").Replace("-",
"").Replace("}", "");
UserGUIDCookie.Value = sGUID;
Response.Cookies.Add(UserGUIDCookie);
}
return sGUID;
}
}
Thanks,
JJ