Change through Textbox

bcm

Well-known member
Joined
Aug 13, 2007
Messages
56
Programming Experience
Beginner
I have created a project of reading app.config configuration file and display it in textboxes
But now I want that when ever the values are displayed in textboxesm, if I change it in textbox it should be simultaneously changed in app.config also.
How can I do that in VB.NET2005???
Please help!!!!
This is my app.config:
HTML:
<applicationSettings>
        <WindowsApplication1.My.MySettings>
            <setting name="Astrology" serializeAs="String">
                <value>6:00</value>
            </setting>
            <setting name="Cricket" serializeAs="String">
                <value>7:00</value>
            </setting>
            <setting name="Foreigncurrency" serializeAs="String">
                <value>8:00</value>
            </setting>
            <setting name="Jobs" serializeAs="String">
                <value>9:00</value>
            </setting>
        </WindowsApplication1.My.MySettings>
    </applicationSettings>
I have displayed the values 6:00,7:00,8:00,9:00 in textbox and I want that if I change this time in textbox the change should occur in app.config file also.
Please soon!!!
 
Last edited by a moderator:
can't you just use my.settings?

ie

VB.NET:
my.settings.Astrology = "9.00"
my.settings.Foreigncurrency = "10.00"
my.settings.save
 
Reply.....

It can be used but I was asked to use other than Me.settings
Please help me!!!!
 
All you have to do is bind the Text property of the textbox control to the user application setting. You do this in designer for textbox properties: (ApplicationSettings) (PropertyBinding), select the setting to link to Text property.
 
Back
Top