473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Invalid token in declaration

With this line (asp.net/c#):
colNameVal = System.Configuration.ConfigurationSettings.AppSett ings;
I get "invalid token '=' in declaration". I also get it for "invalid token
';' in declaration".
I don't understand what the compiler is trying to say. Can you clarify/solve?

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200601/1
Jan 24 '06 #1
3 1520
try:

NameValueCollection colNameVal =
System.Configuration.ConfigurationSettings.AppSett ings;

instead of

colNameVal = System.Configuration.ConfigurationSettings.AppSett ings;
Jan 24 '06 #2
It would also help if you could display the line immediately before the line
you showed. It could be missing a semicolon, or have somethign wrong with
it.

"Gabriel Magaña" <no*****@no-spam.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
try:

NameValueCollection colNameVal =
System.Configuration.ConfigurationSettings.AppSett ings;

instead of

colNameVal = System.Configuration.ConfigurationSettings.AppSett ings;

Jan 24 '06 #3
Thank you for your help I found the solution. I had the namevaluecollection
and the appsettings line in the class. I moved it to the button onclick and
it worked. I looked up the error code in the ms library and it gave me a clue
what the compiler was asking me to do.

Gabriel Magaña wrote:
It would also help if you could display the line immediately before the line
you showed. It could be missing a semicolon, or have somethign wrong with
it.
try:

[quoted text clipped - 4 lines]

colNameVal = System.Configuration.ConfigurationSettings.AppSett ings;


--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200601/1
Jan 24 '06 #4

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

Similar topics

4
by: Erik H. | last post by:
I have an ASPX page in which I am trying to bind a datagrid to a dataset pulled from Microsoft Access DB using code inline method. For some reason, the compiler is having a problem with 'using'....
0
by: s.caron | last post by:
Hi, I'm trying to open an aspx page but I have this error Compiler Error Message: CS1519: Invalid token '=' in class, struct, or interface member declaration in the line : ...
3
by: Erik H. | last post by:
I have an ASPX page in which I am trying to bind a datagrid to a dataset pulled from Microsoft Access DB using code inline method. For some reason, the compiler is having a problem with 'using'....
3
by: Twanger | last post by:
I'm getting a compiler error on my ASP.NET page and I can't see the cause. I have a simple C# class compiled into a DLL and placed in my bin directory which has a public property QuestionText. ...
0
by: Ben Holness | last post by:
Hi all, I have a system which allows users to enter a message on a (PHP) website. This message is then put into a (MySQL) Database. A perl script then picks up the message and creates an XML...
9
by: Nelmr1 | last post by:
I'm using 2002.Net, 1.0 framwork. I am basically learning C# so I wrote this and get invalid token errors. Does anyone see why? using System; namespace ConsoleApplication2 {
4
by: jvictor118 | last post by:
I've been using the xml.sax.handler module to do event-driven parsing of XML files in this python application I'm working on. However, I keep having really pesky invalid token exceptions....
9
by: Sebouh | last post by:
I'm very close of shooting myself in the head right now. Why in hell does free(xx) give me an error: *** glibc detected *** free(): invalid pointer: 0x08ce6158 *** // The function returns...
3
by: brad | last post by:
This works: This does not (one the end, 09 is used instead of 9) File "<stdin>", line 1 area_group = {001:06, 002:04, 003:04, 006:09} SyntaxError: invalid token Why does 09 cause an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...
0
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...

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.