473,750 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

trivial ? build error

Hi all,

II am getting a build error for the folowing statement:

String sGetVarVal = Request.QuerySt ring("myvar");

error:

System.Web.Http Request.QuerySt ring' 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.


Nov 19 '05 #1
4 1070
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.QuerySt ring("myvar");

error:

System.Web.Http Request.QuerySt ring' 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.


Nov 19 '05 #2
Carlos,

Have you just moved from vb to vc#?

String sGetVarVal = Request.QuerySt ring["myvar"];

Eliyahu

"Carlos" <ch******@yahoo .com> wrote in message
news:eL******** ******@TK2MSFTN GP10.phx.gbl...
Hi all,

II am getting a build error for the folowing statement:

String sGetVarVal = Request.QuerySt ring("myvar");

error:

System.Web.Http Request.QuerySt ring' 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.


Nov 19 '05 #3
Try String sGetVarVal = Request.QuerySt ring["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" <ch******@yahoo .com> wrote in message
news:eL******** ******@TK2MSFTN GP10.phx.gbl...
Hi all,

II am getting a build error for the folowing statement:

String sGetVarVal = Request.QuerySt ring("myvar");

error:

System.Web.Http Request.QuerySt ring' 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.


Nov 19 '05 #4
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" <ch******@yahoo .com> wrote in message
news:eL******** ******@TK2MSFTN GP10.phx.gbl...
Hi all,

II am getting a build error for the folowing statement:

String sGetVarVal = Request.QuerySt ring("myvar");

error:

System.Web.Http Request.QuerySt ring' 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.


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
3486
by: Brian Patterson | last post by:
I have noticed in the book of words that hasattr works by calling getattr and raising an exception if no such attribute exists. If I need the value in any case, am I better off using getattr within a try statement myself, or is there some clever implementation enhancement which makes this a bad idea? i.e. should I prefer: if hasattr(self,"datum"): datum=getattr("datum") else: datum=None
2
4379
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two files containing some templates: adjacency_list.hpp and mem_fn.hpp can not compile. Does anyone have any solutions?
10
2345
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a similar name to the table. Rather than making a long Select Case that could become obsolete if lookup tables are added and the source table of the ListBox is edited I came up with this code.) This code works but of course it gives me build...
5
1475
by: Alfonso Morra | last post by:
Hi, I've written a very simple Simpleton design pattern class template. This was supposed to illustrate a point. Although it compiles without nay errors, I get link errors (unresolved external), during linking - before anyone jumps to conclusions that this is OT, please check the linker error message below, it is NOT OT. Here are my class declarations/definitions:
0
1757
by: ktelep | last post by:
I'm trying to build python 2.4.2 on AIX 5.3 with the IBM xlC compiler as per the notes in the AIX Readme file. Basically my make fails with the errors listed below. I'm calling configure with: ../configure --with-gcc="xlc_r -q64" --with-cxx="xlC_r -q64" --disable-ipv6 AR="ar -X64" It looks like it's not resolving symbols in readline. I originally
4
2651
by: Edward Diener | last post by:
When I try to find out if a trivial event has handlers, by comparing the event to nullptr, I get compiler error C3918. So my natural question is how does one test a trivial event for handlers ?
1
2130
by: Ted Zeng | last post by:
Hi, I am new to Python. I am trying to build MySQLdb for my PowerPC PowerMac. I just downloaded the source last week and tried to build it. But I got the error messages as follow. I checked and there is no such files as mysql_config mysql.h my_config.h
5
1450
by: michael.d.pedersen | last post by:
Hello group, I am new to Visual C++ 8 and have a seemingly trivial problem using namespaces. The scenario: I have two classes, TestClass1 and TestClass2, in the namespace Test. I would like to create a reference to TestClass2 in TestClass1; but the compiler doesn't seem to recognize the namespace Test and any classes in it. Here are my class definitions and declarations:
6
7679
by: Soren | last post by:
Hi! I'm trying to extend my python program with some C++ code. Right now I've spent hours just trying to get boost to work! I'm trying to get the example hello.cpp to work. Using Windows XP and Visual Studio 8 (.NET 2005) I've set BOOST_BUILD_PATH = C:\boost\boost_1_33_1 (where i installed
0
9002
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9399
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9345
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9259
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6817
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4895
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3328
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2228
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.