Protected Function GetStyle(key As String) As String
Dim cookie As HttpCookie = Request.Cookies("preferences1")
If cookie <> Null Then
Select Case key
Case "ForeColor"
Return(cookie.Values("ForeColor"))
Case ...
End Select
End If
Return("")
End Function
protected function GetStyle(key:String) : String {
var cookie:HttpCookie = Request.Cookies("preferences1");
if (cookie != null) {
switch (key)
{
case "ForeColor" : return cookie.Values("ForeColor"); break;
...
}
}
return "";
}