referencing an object inside a class definition

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I'm trying to define a class. In the class, I'm initializing one of its
private string variables with a value from an HTML form using something like:
'variable = Request.Form.Get("formVariable").ToString();'

However, I'm getting the error:

System.Web.UI.Page.Request denotes a property where a class was expected

What a m I doing wrong?

many thanks,

Pete
 
Italian said:
I'm trying to define a class. In the class, I'm initializing one of its
private string variables with a value from an HTML form using something like:
'variable = Request.Form.Get("formVariable").ToString();'

However, I'm getting the error:

System.Web.UI.Page.Request denotes a property where a class was expected

What a m I doing wrong?

It's hard to say as you haven't shown much context. Could you provide a
short but complete example which demonstrates the problem?

See http://www.pobox.com/~skeet/csharp/complete.html

Jon
 
Back
Top