[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

How Can I change a settings

I have a variable in My.Settings  name ShortProductForm  as boolean .

How Can I change it to My.Settings.ShortProductForm = false / true . within My Application

Or as xml file.
0
Ahmadal_najjar2003
Asked:
Ahmadal_najjar2003
  • 3
  • 2
1 Solution
 
jpaulinoCommented:
You just need to save it after you change it

My.Settings.ShortProductForm = False
My.Settings.Save()
0
 
Ahmadal_najjar2003Author Commented:
I Put it but the editor itself says (property is read only)
0
 
jpaulinoCommented:
You defined the scope (when you define the setting) as user, not as application.
0
 
Ahmadal_najjar2003Author Commented:
So , do I have to set it as user. Bec I defined it as application .
0
 
jpaulinoCommented:
Yes, you have to define as user not as application is you want to make changes on it.

"Scope indicates if the property is read-only. If the value is Application, the property is read-only; if the value is User, the property is read-write"
http://msdn.microsoft.com/en-us/library/saa62613(VS.80).aspx
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now