Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > trivial ? build error

Reply
Thread Tools

trivial ? build error

 
 
Carlos
Guest
Posts: n/a
 
      02-09-2005
Hi all,

II am getting a build error for the folowing statement:

String sGetVarVal = Request.QueryString("myvar");

error:

System.Web.HttpRequest.QueryString' denotes a 'property' where a 'method'
was expected

I though that the statement is correct!! have seen it a lot of times. Can
anyone help on this? Thanks



Carlos.






 
Reply With Quote
 
 
 
 
=?Utf-8?B?R29sZA==?=
Guest
Posts: n/a
 
      02-09-2005
Use [ ] - this squre brackets instead of this ( )

Regards
Thangam,


"Carlos" wrote:

> Hi all,
>
> II am getting a build error for the folowing statement:
>
> String sGetVarVal = Request.QueryString("myvar");
>
> error:
>
> System.Web.HttpRequest.QueryString' denotes a 'property' where a 'method'
> was expected
>
> I though that the statement is correct!! have seen it a lot of times. Can
> anyone help on this? Thanks
>
>
>
> Carlos.
>
>
>
>
>
>
>

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      02-09-2005
Carlos,

Have you just moved from vb to vc#?

String sGetVarVal = Request.QueryString["myvar"];

Eliyahu

"Carlos" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> II am getting a build error for the folowing statement:
>
> String sGetVarVal = Request.QueryString("myvar");
>
> error:
>
> System.Web.HttpRequest.QueryString' denotes a 'property' where a 'method'
> was expected
>
> I though that the statement is correct!! have seen it a lot of times. Can
> anyone help on this? Thanks
>
>
>
> Carlos.
>
>
>
>
>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      02-09-2005
Try String sGetVarVal = Request.QueryString["myvar"];

You're using VB syntax in C# code.




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
=====================

"Carlos" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> II am getting a build error for the folowing statement:
>
> String sGetVarVal = Request.QueryString("myvar");
>
> error:
>
> System.Web.HttpRequest.QueryString' denotes a 'property' where a 'method'
> was expected
>
> I though that the statement is correct!! have seen it a lot of times. Can
> anyone help on this? Thanks
>
>
>
> Carlos.
>
>
>
>
>
>



 
Reply With Quote
 
Karl Seguin
Guest
Posts: n/a
 
      02-09-2005
As others have pointed out, C# cleans up the ambiguity with respect to
functions() and arrays[]

If, as others have suggested, you are moving from VB.Net to C#, you might
want to check out:
http://www.harding.edu/USER/fmccown/...omparison.html

Other than that my follow up to this thread has been little more than a
"what he said" ...but makes me feel nonetheless special

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/


"Carlos" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> II am getting a build error for the folowing statement:
>
> String sGetVarVal = Request.QueryString("myvar");
>
> error:
>
> System.Web.HttpRequest.QueryString' denotes a 'property' where a 'method'
> was expected
>
> I though that the statement is correct!! have seen it a lot of times. Can
> anyone help on this? Thanks
>
>
>
> Carlos.
>
>
>
>
>
>



 
Reply With Quote
 
rishibajaj rishibajaj is offline
Junior Member
Join Date: Aug 2006
Posts: 1
 
      08-25-2006
use [] instead of ()
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
trivial or non-trivial object baibaichen C++ 3 01-12-2006 03:01 PM
Build errors on "trivial" proof of concept design pattern Alfonso Morra C++ 5 08-31-2005 01:39 PM
Adding type parameter to trivial class triggers compile error in java 1.5 HK Java 0 07-18-2005 01:07 PM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM
Trivial resources problem (beginner) Larry Smith ASP .Net 3 10-02-2003 10:55 PM



Advertisments