Click here to Skip to main content
15,890,579 members
Home / Discussions / C#
   

C#

 
Questionexception in datagridview Pin
hotthoughtguy8-Oct-09 7:51
hotthoughtguy8-Oct-09 7:51 
AnswerRe: exception in datagridview Pin
Dave Kreskowiak8-Oct-09 8:54
mveDave Kreskowiak8-Oct-09 8:54 
QuestionMQ Client Error Pin
Jeanie24248-Oct-09 6:58
Jeanie24248-Oct-09 6:58 
AnswerRe: MQ Client Error Pin
harold aptroot8-Oct-09 7:38
harold aptroot8-Oct-09 7:38 
GeneralRe: MQ Client Error Pin
Jeanie24248-Oct-09 9:26
Jeanie24248-Oct-09 9:26 
QuestionProblem with changing connection string that saved in app.config Pin
hdv2128-Oct-09 6:13
hdv2128-Oct-09 6:13 
AnswerRe: Problem with changing connection string that saved in app.config Pin
Md. Marufuzzaman8-Oct-09 6:37
professionalMd. Marufuzzaman8-Oct-09 6:37 
GeneralRe: Problem with changing connection string that saved in app.config Pin
hdv2128-Oct-09 7:25
hdv2128-Oct-09 7:25 
here is my Settings.Designer.cs code (my modification code is bold) :

[global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
        //[global::System.Configuration.DefaultSettingValueAttribute("Data Source=.;Initial Catalog=mehr;Integrated Security=True")]
        public string mehrConnectionString {
            get {
                return ((string)(this["mehrConnectionString"]));
            }
            set
            {
                this["mehrConnectionString"] = value;
            }
        }

        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
        //[global::System.Configuration.DefaultSettingValueAttribute("Data Source=.;Initial Catalog=mehr;Integrated Security=True")]
        public string mehrConnectionString1 {
            get {
                return ((string)(this["mehrConnectionString1"]));
            }
            set
            {
                this["mehrConnectionString1"] = value;
            }
        }


here is my code to save in app.config :

Properties.Settings.Default.serverName = this.txtServer.Text;
                    Properties.Settings.Default.userName = this.txtUser.Text;
                    Properties.Settings.Default.password = this.txtPass.Text;

                    if (this.radioLocal.Checked)
                    {
                        Properties.Settings.Default.network = false;
                        Properties.Settings.Default.mehrConnectionString = string.Format("Data Source={0};Initial Catalog=mehr;Integrated Security=True", this.txtServer.Text);
                        Properties.Settings.Default.mehrConnectionString1 = string.Format("Data Source={0};Initial Catalog=mehr;Integrated Security=True", this.txtServer.Text);
                    }
                    else
                    {
                        Properties.Settings.Default.network = true;
                        Properties.Settings.Default.mehrConnectionString = string.Format("Data Source={0};Initial Catalog=mehr;User Id={1};Password={2};", this.txtServer.Text, this.txtUser.Text, this.txtPass.Text);
                        Properties.Settings.Default.mehrConnectionString1 = string.Format("Data Source={0};Initial Catalog=mehr;User Id={1};Password={2};", this.txtServer.Text, this.txtUser.Text, this.txtPass.Text);
                    }
                    Properties.Settings.Default.Save();


regards
GeneralRe: Problem with changing connection string that saved in app.config Pin
Md. Marufuzzaman8-Oct-09 7:44
professionalMd. Marufuzzaman8-Oct-09 7:44 
GeneralRe: Problem with changing connection string that saved in app.config Pin
hdv2128-Oct-09 8:03
hdv2128-Oct-09 8:03 
GeneralRe: Problem with changing connection string that saved in app.config Pin
Md. Marufuzzaman8-Oct-09 9:25
professionalMd. Marufuzzaman8-Oct-09 9:25 
GeneralRe: Problem with changing connection string that saved in app.config Pin
hdv2128-Oct-09 10:43
hdv2128-Oct-09 10:43 
AnswerRe: Problem with changing connection string that saved in app.config Pin
cjoki12-Oct-09 5:34
cjoki12-Oct-09 5:34 
Questionnavigator in datagridview Pin
hotthoughtguy8-Oct-09 5:03
hotthoughtguy8-Oct-09 5:03 
AnswerRe: navigator in datagridview Pin
Luc Pattyn8-Oct-09 5:19
sitebuilderLuc Pattyn8-Oct-09 5:19 
Question[Message Deleted] Pin
hotthoughtguy8-Oct-09 4:53
hotthoughtguy8-Oct-09 4:53 
AnswerRe: hi Pin
AndyInUK8-Oct-09 4:56
AndyInUK8-Oct-09 4:56 
QuestionPassing a Form's control to a routine in another class as a variable Pin
yogi_bear_798-Oct-09 4:39
yogi_bear_798-Oct-09 4:39 
AnswerRe: Passing a Form's control to a routine in another class as a variable Pin
Richard MacCutchan8-Oct-09 4:51
mveRichard MacCutchan8-Oct-09 4:51 
GeneralRe: Passing a Form's control to a routine in another class as a variable Pin
yogi_bear_798-Oct-09 4:54
yogi_bear_798-Oct-09 4:54 
AnswerRe: Passing a Form's control to a routine in another class as a variable Pin
Henry Minute8-Oct-09 4:58
Henry Minute8-Oct-09 4:58 
AnswerRe: Passing a Form's control to a routine in another class as a variable Pin
PIEBALDconsult8-Oct-09 5:32
mvePIEBALDconsult8-Oct-09 5:32 
QuestionSuggestions for general networking solution on WAN and LAN Pin
lvq6848-Oct-09 4:24
lvq6848-Oct-09 4:24 
AnswerRe: Suggestions for general networking solution on WAN and LAN Pin
Mirko19808-Oct-09 4:40
Mirko19808-Oct-09 4:40 
Question[C#.NET 2008] Screen-scraping a HTML Page Pin
Dimitri Backaert8-Oct-09 3:47
Dimitri Backaert8-Oct-09 3:47 

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.