473,396 Members | 1,997 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,396 software developers and data experts.

'SomeValue' is not a member of 'MySettings'

[VS2005, VB.Net, ASP.Net, XP SP2]

Hello, I have a class that exposes several values like so:

Public Shared ConnString As String

The class, originally enough, is named "Settings". If I interrogate a value
of this object in the immediate window, I get the following exchange:

?Settings.ConnString
'ConnString' is not a member of 'MySettings'.

I'm not sure why it thinks I'm trying to access "MySettings". Also, when
typing the first line (above) into the immediate window, I get the correct
intellisense for my settings object. So what's the deal with "MySettings"?
TIA.

Oct 25 '07 #1
1 5659
Hi Monty,

Based on my understanding, you probably are using Web Application Project
mode instead of the Web Site mode and created Application Settings in your
project, the Settings Designer will generate a property named Settings in a
module, the Settings property is a singleton that returns a type of
My.MySettings that generated from your settings. For example:

Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttrib ute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttri bute(), _
Global.System.Runtime.CompilerServices.CompilerGen eratedAttribute() _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAt tribute("My.Settings") _
Friend ReadOnly Property Settings() As
Global.WebApplication1.My.MySettings
Get
Return Global.WebApplication1.My.MySettings.Default
End Get
End Property
End Module
End Namespace
It's recommended to avoid use Settings as your class name.
References:

#Application Settings in VB.NET 2005
http://visualbasic.about.com/od/usin...settings_4.htm
#Using My.Settings in Visual Basic 2005
http://msdn2.microsoft.com/en-us/lib...11(vs.80).aspx
Hope this helps.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 25 '07 #2

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

Similar topics

2
by: Wenjie | last post by:
Hello, I read someone posted assertions that even the (public) member function is not static, there are probably only one copy of the code in the executable. Then except the...
4
by: Jian H. Li | last post by:
Hello, What's the essential differences between the two ways of "class::member" & "object.member"(or object_pointer->member)? class C{ public: void f() {} int i; };
9
by: Terry E Dow | last post by:
Howdy, I am having trouble with the objectCategory=group member.Count attribute. I get one of three counts, a number between 1-999, no member (does not contain member property), or 0. Using...
3
by: dejavue82 | last post by:
Hi, Is it possible to read from a Session object in one of the Global.asax events? I'm wondering, since I'm not sure if there is one instance of Global.asax running per app or one for each...
6
by: TimothyDoran | last post by:
Hello first of all thank you for your time in reading this post. My problem is that i have a setting called 'altitude'. I want to pass this setting to another function or sub, but i cant seem to...
1
by: bg_ie | last post by:
Hi, I have my own UserSettings class that I wish to include within my windows application. To include it at the moment, I do something like this - namespace WindowsApplication1 { static...
2
by: cmay | last post by:
I have an asp.net application at the root, and other applications suchs as /WebApp1, /WebApp2. By design, these web applications inherit the root application's web.config file. But, when you...
7
by: WaterWalk | last post by:
Hello. I thought I understood member function pointers, but in fact I don't. Consider the following example: class Base { public: virtual ~Base() {} }; class Derived : public Base {
4
by: raylopez99 | last post by:
I would like to know if there's a quick "Linq" way to find the index of an array having a particular value. I can do this the long way by sequential iteration, but would like to know if there's a...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.