Setting Default Application Value RRS feed

  • Question

  • Hi,

    I am creating an application which is not containing any database or file system.For this application i want to store a configuration i.e. user type which user can set only when first time it starts the application.Next time it will automatically get the usertype which previously selected.

    ##Goals are not necessary to motivate us.They are essential to really keep us alive.##

    Thursday, October 16, 2014 6:25 AM


  • You can create a xml file accompany with the application, xml can look like:

    <?xml version="1.0" encoding="utf-8"?>

    Each time the application start the program will check the xml file and the innertext of username node. If it is nullorempty it will allow user to type his/her name in a textbox and assign username.innertext = textbox.text  and then save xml file.

    If it has a value the program will read username.innertext and display it on a form. Not display a dialogbox for user to type his / her name.

    Thursday, October 16, 2014 8:12 AM