Click here to Skip to main content
15,898,825 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionI will created dynamic check boxes in panel but it losing the checked values when i reloads Pin
haneef112-Apr-07 0:10
haneef112-Apr-07 0:10 
AnswerRe: I will created dynamic check boxes in panel but it losing the checked values when i reloads Pin
Sun Rays12-Apr-07 0:18
Sun Rays12-Apr-07 0:18 
QuestionHow do solve the Internet Explorer Script Error? [modified] Pin
jayarajmrj11-Apr-07 23:42
jayarajmrj11-Apr-07 23:42 
GeneralRe: How do solve the Internet Explorer Script Error? Pin
Guffa12-Apr-07 0:11
Guffa12-Apr-07 0:11 
GeneralRe: How do solve the Internet Explorer Script Error? Pin
jayarajmrj12-Apr-07 0:21
jayarajmrj12-Apr-07 0:21 
GeneralRe: How do solve the Internet Explorer Script Error? Pin
Guffa12-Apr-07 8:10
Guffa12-Apr-07 8:10 
AnswerRe: How do solve the Internet Explorer Script Error? Pin
uowzd0112-Apr-07 15:55
uowzd0112-Apr-07 15:55 
Questionmodify a connection string in the web.config file [modified] Pin
steve_rm11-Apr-07 23:40
steve_rm11-Apr-07 23:40 
Hello

VS 2005

I have my connection string in the web.config as followings
<br />
appSettings<br />
  connectionStrings<br />
    add name="serviceMasterConnectionString" connectionString="Data Source=CF_DEVELOP\realitysql;Initial Catalog=ServiceMaster;User ID=;Password="<br />
  connectionStrings<br />


I can read the connection string using the following. but how do i change the connection string.

imports system.web.configuration<br />
imports system.configuration<br />
Dim cnnString As String<br />
        cnnString = WebConfigurationManager.ConnectionStrings("serviceMasterConnectionString").ConnectionString()<br />
        cnn.ConnectionString = cnnString<br />


I tried the following and got an error message.
config.ConnectionStrings.ConnectionStrings("serviceMasterConnectionString").ConnectionString = "new connection string"<br />
     config.Save()<br />


Error:
Access to the path 'C:\Inetpub\wwwroot\CodeRedIncidents\web.config' is denied.

I would like to change the connection string at run-time and save it.

Does anyone have any code examples.

Many thanks,

Steve



-- modified at 5:56 Thursday 12th April, 2007
AnswerRe: modify a connection string in the web.config file Pin
Mayank Parmar12-Apr-07 0:18
professionalMayank Parmar12-Apr-07 0:18 
QuestionRe: modify a connection string in the web.config file Pin
steve_rm12-Apr-07 1:46
steve_rm12-Apr-07 1:46 
Questionwhat is vsdisco file in asp.net Pin
Shuaib wasif khan11-Apr-07 23:26
Shuaib wasif khan11-Apr-07 23:26 
AnswerRe: what is vsdisco file in asp.net Pin
Sun Rays12-Apr-07 0:12
Sun Rays12-Apr-07 0:12 
Questionwindows service Pin
siddisagar11-Apr-07 23:14
siddisagar11-Apr-07 23:14 
QuestionAJAX simple problem Pin
Yoyosch11-Apr-07 22:57
Yoyosch11-Apr-07 22:57 
QuestionGridView row background color Pin
Yoyosch11-Apr-07 22:56
Yoyosch11-Apr-07 22:56 
AnswerRe: GridView row background color Pin
Naveed Kamboh11-Apr-07 23:11
Naveed Kamboh11-Apr-07 23:11 
GeneralRe: GridView row background color Pin
Yoyosch12-Apr-07 0:04
Yoyosch12-Apr-07 0:04 
GeneralRe: GridView row background color Pin
Naveed Kamboh12-Apr-07 0:06
Naveed Kamboh12-Apr-07 0:06 
Questionhelp wit my custom validation rule Pin
neodeaths11-Apr-07 22:56
neodeaths11-Apr-07 22:56 
QuestionFileInfo-----local machince vs/Hosting machine---help needed Pin
Naveed Kamboh11-Apr-07 22:50
Naveed Kamboh11-Apr-07 22:50 
AnswerRe: FileInfo-----local machince vs/Hosting machine---help needed Pin
Guffa11-Apr-07 23:31
Guffa11-Apr-07 23:31 
GeneralRe: FileInfo-----local machince vs/Hosting machine---help needed Pin
Naveed Kamboh11-Apr-07 23:34
Naveed Kamboh11-Apr-07 23:34 
AnswerRe: FileInfo-----local machince vs/Hosting machine---help needed Pin
Guffa11-Apr-07 23:40
Guffa11-Apr-07 23:40 
GeneralRe: FileInfo-----local machince vs/Hosting machine---help needed Pin
Naveed Kamboh11-Apr-07 23:40
Naveed Kamboh11-Apr-07 23:40 
Questioncaptcha image problem Pin
Kunal P11-Apr-07 22:36
Kunal P11-Apr-07 22:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.