Results 1 to 4 of 4

Thread: Request.QueryString

  1. #1

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Request.QueryString

    I've got this:

    string tmp = Request.QueryString("PersonID");

    and get this error:

    Compiler Error Message: CS0118: 'System.Web.HttpRequest.QueryString' denotes a 'property' where a 'method' was expected

    What am i doing wrong, i've looked at examples and can't see any difference.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  2. #2
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    Re: Request.QueryString

    Code:
    dim  tmp as String
    tmp = request.querystring("PersonID")
    is right for VB, dont know about C#, maybe square brackets are needed instead of rounds ones

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Request.QueryString

    In C#,

    string tmp = Request.QueryString["PersonID"];

  4. #4

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: Request.QueryString

    Ah, of course. I was thinking QueryString was a method, but as the error message says, it's a property.

    Silly me. Thanks guys!
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width