Hi,
I need to change the connectionstring area of my aap.config file in vb.net. I have tried several codes but nothing worked for me. I was suggested following code
Dim config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)
Dim connectionStringsSection = DirectCast(config.GetSection("connectionStrings"), ConnectionStringsSection)
connectionStringsSection.ConnectionStrings("Blah").ConnectionString = "Data Source=blah;Initial Catalog=blah;UID=blah;password=blah"
config.Save()
ConfigurationManager.RefreshSection("connectionStrings")
But I do not understand what will be "Blah" in my code? Also how does this change the text?
Secondly, if I use Readalltext and replacetext and then writealltext, will it be ok or it can cause any problems?
Thanks