{"id":70289,"date":"2021-08-31T04:10:09","date_gmt":"2021-08-31T08:10:09","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/manipulating-configuration-parameters-for-example-variables-in-web-config-net-web-applications\/"},"modified":"2021-08-31T04:10:09","modified_gmt":"2021-08-31T08:10:09","slug":"manipulating-configuration-parameters-for-example-variables-in-web-config-net-web-applications","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=70289","title":{"rendered":"Manipulating Configuration Parameters: For example Variables in web.config #.Net Web Applications"},"content":{"rendered":"<p>Brought from (our old site): http:\/\/salearningschool.com\/displayArticle.php?table=Articles&amp;articleID=1324&amp;title=Manipulating%20Configuration%20Parameters:%20For%20example%20Variables%20in%20web.config<\/p>\n<p>To access a variable value, you can use the following type of code<\/p>\n<pre style=\"padding:20px;font-size:12px\">\n   string statusr = WebConfigurationManager.AppSettings[\"userLoginStatus\"].ToString();\n<\/pre>\n<pre style=\"padding:20px;font-size:12px\">\n   You will need to use: using System.Web.Configuration; or you can write as follows:\n   string statusr = \n   System.Web.Configuration.WebConfigurationManager.AppSettings[\"userLoginStatus\"].ToString();\n<\/pre>\n<p>   What about if you want to change the values of the variables in the web.config file. Check the code below:<\/p>\n<pre style=\"padding:20px;font-size:12px\">\n\n\/\/Compiled\nConfiguration myConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(\"~\");\n\n\/\/change values for the variables in the AppSettings section\nmyConfig.AppSettings.Settings[\"userLoginStatus\"].Value = \"1\";\n\n\/\/change values for the connection strings section\nmyConfig.ConnectionStrings.ConnectionStrings[\"myDatabaseName\"].ConnectionString = \n   \"Data Source=....\";\n\nmyConfig.Save();\n\n\/\/will return you the new value\nstring statusr = WebConfigurationManager.AppSettings[\"userLoginStatus\"].ToString();\n\n<\/pre>\n<p>The above code used: <br \/>\nSystem.Web.Configuration;<br \/>\nusing System.Configuration;<\/p>\n<p>From: http:\/\/sitestree.com\/?p=3726<br \/> Categories:.Net Web Applications<br \/>Tags:<br \/> Post Data:2016-07-16 11:06:25<\/p>\n<pre><code>    Shop Online: &lt;a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\"&gt;https:\/\/www.ShopForSoul.com\/&lt;\/a&gt;\n    (Big Data, Cloud, Security, Machine Learning): Courses: &lt;a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"&gt; http:\/\/Training.SitesTree.com&lt;\/a&gt; \n    In Bengali: &lt;a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\"&gt;http:\/\/Bangla.SaLearningSchool.com&lt;\/a&gt;\n    &lt;a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\"&gt;http:\/\/SitesTree.com&lt;\/a&gt;\n    8112223 Canada Inc.\/JustEtc: &lt;a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\"&gt;http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) &lt;\/a&gt;\n    Shop Online: &lt;a href='https:\/\/www.ShopForSoul.com'&gt; https:\/\/www.ShopForSoul.com\/&lt;\/a&gt;\n    Medium: &lt;a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"&gt; https:\/\/medium.com\/@SayedAhmedCanada &lt;\/a&gt;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Brought from (our old site): http:\/\/salearningschool.com\/displayArticle.php?table=Articles&amp;articleID=1324&amp;title=Manipulating%20Configuration%20Parameters:%20For%20example%20Variables%20in%20web.config To access a variable value, you can use the following type of code string statusr = WebConfigurationManager.AppSettings[&#8220;userLoginStatus&#8221;].ToString(); You will need to use: using System.Web.Configuration; or you can write as follows: string statusr = System.Web.Configuration.WebConfigurationManager.AppSettings[&#8220;userLoginStatus&#8221;].ToString(); What about if you want to change the values of the variables in the web.config &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=70289\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-70289","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":69888,"url":"http:\/\/bangla.sitestree.com\/?p=69888","url_meta":{"origin":70289,"position":0},"title":"Manipulating Configuration Parameters: For example Variables in web.config #19","author":"Author-Check- Article-or-Video","date":"August 21, 2021","format":false,"excerpt":"To access a variable value, you can use the following type of code string statusr = WebConfigurationManager.AppSettings[\"userLoginStatus\"].ToString(); You will need to use: using System.Web.Configuration;or you can write as follows:string statusr = System.Web.Configuration.WebConfigurationManager.AppSettings[\"userLoginStatus\"].ToString(); What about if you want to change the values of the variables in the web.config file. Check the\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78358,"url":"http:\/\/bangla.sitestree.com\/?p=78358","url_meta":{"origin":70289,"position":1},"title":"Application State Variables in C#.net","author":"Sayed","date":"August 5, 2025","format":false,"excerpt":"Here\u2019s a clear, copyright-free explanation of Application State Variables in C#.NET, ideal for blogs, Facebook pages, or classroom notes. \ud83c\udf10 Application State Variables in C#\/.NET Application State in ASP.NET is a way to store global data that is shared by all users across the entire web application. It is commonly\u2026","rel":"","context":"In &quot;C# - Misc&quot;","block_context":{"text":"C# - Misc","link":"http:\/\/bangla.sitestree.com\/?cat=1973"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7134,"url":"http:\/\/bangla.sitestree.com\/?p=7134","url_meta":{"origin":70289,"position":2},"title":"\u099c\u09be\u09ad\u09be\u09b8\u09cd\u0995\u09cd\u09b0\u09bf\u09aa\u09cd\u099f \u099f\u09be\u0987\u09aa \u09b0\u09c2\u09aa\u09be\u09a8\u09cd\u09a4\u09b0\u0995\u09b0\u09a3 (JavaScript Type Conversion)","author":"Author-Check- Article-or-Video","date":"April 1, 2015","format":false,"excerpt":"\u0986\u09a6\u09a8\u09be\u09a8 \u09a8\u09be\u09b9\u09bf\u09a6 \u09b8\u09b0\u0995\u09be\u09b0\u09bf \u09a4\u09bf\u09a4\u09c1\u09ae\u09c0\u09b0 \u0995\u09b2\u09c7\u099c \u00a0 \u09a8\u09be\u09ae\u09cd\u09ac\u09be\u09b0 \u09a5\u09c7\u0995\u09c7 \u09a8\u09be\u09ae\u09cd\u09ac\u09be\u09b0\u09c7 \u09aa\u09b0\u09bf\u09ac\u09b0\u09cd\u09a4\u09a8, \u09b8\u09cd\u099f\u09cd\u09b0\u09bf\u0982 \u09a5\u09c7\u0995\u09c7 \u09b8\u09cd\u099f\u09cd\u09b0\u09bf\u0982 \u098f \u09aa\u09b0\u09bf\u09ac\u09b0\u09cd\u09a4\u09a8, \u09ac\u09c1\u09b2\u09bf\u09af\u09bc\u09be\u09a8 \u09a5\u09c7\u0995\u09c7 \u09ac\u09c1\u09b2\u09bf\u09df\u09be\u09a8\u09c7 \u09aa\u09b0\u09bf\u09ac\u09b0\u09cd\u09a4\u09a8 \u0995\u09b0\u09be \u09af\u09be\u09df \u0964 \u099c\u09be\u09ad\u09be\u09b8\u09cd\u0995\u09cd\u09b0\u09bf\u09aa\u09cd\u099f \u09a1\u09c7\u099f\u09be \u09aa\u09cd\u09b0\u0995\u09be\u09b0\u09ad\u09c7\u09a6 \u09ae\u09be\u09a8 \u09a7\u09be\u09b0\u09a3 \u0995\u09b0\u09a4\u09c7 \u09aa\u09be\u09b0\u09c7 \u099c\u09be\u09ad\u09be\u09b8\u09cd\u0995\u09cd\u09b0\u09bf\u09aa\u09cd\u099f\u09c7 \u098f\u09ae\u09a8 5 \u09a7\u09b0\u09a8\u09c7\u09b0 \u09a1\u09be\u099f\u09be \u099f\u09be\u0987\u09aa \u0986\u099b\u09c7: \u09b8\u09cd\u099f\u09cd\u09b0\u09bf\u0982 \u09a8\u09be\u09ae\u09cd\u09ac\u09be\u09b0 \u09ac\u09c1\u09b2\u09bf\u09af\u09bc\u09be\u09a8 \u0985\u09ac\u099c\u09c7\u0995\u09cd\u099f \u09ab\u09be\u0982\u09b6\u09a8 \u0985\u09ac\u099c\u09c7\u0995\u09cd\u099f \u09e9 \u09a7\u09b0\u09a8\u09c7\u09b0 \u09b9\u09af\u09bc: \u0985\u09ac\u099c\u09c7\u0995\u09cd\u099f \u09a4\u09be\u09b0\u09bf\u0996 \u0985\u09cd\u09af\u09be\u09b0\u09c7 \u09ac\u09be \u09b6\u09cd\u09b0\u09c7\u09a3\u09c0\u09ac\u09bf\u09a8\u09cd\u09af\u09be\u09b8\u2026","rel":"","context":"In &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"http:\/\/bangla.sitestree.com\/?cat=65"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":75987,"url":"http:\/\/bangla.sitestree.com\/?p=75987","url_meta":{"origin":70289,"position":3},"title":"Lombak, Getter Setter Example","author":"Sayed","date":"April 28, 2024","format":false,"excerpt":"Ref: https:\/\/projectlombok.org\/features\/GetterSetter import lombok.AccessLevel; import lombok.Getter; import lombok.Setter; public class GetterSetterExample { \/** * Age of the person. Water is wet. * * @param age New value for this person's age. Sky is blue. * @return The current value of this person's age. Circles are round. *\/ @Getter @Setter private\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/04\/image-3.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/04\/image-3.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/04\/image-3.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/04\/image-3.png?resize=700%2C400 2x"},"classes":[]},{"id":65677,"url":"http:\/\/bangla.sitestree.com\/?p=65677","url_meta":{"origin":70289,"position":4},"title":"Debugging in .Net, (XML Web Services) #Misc .Net","author":"Author-Check- Article-or-Video","date":"July 11, 2021","format":false,"excerpt":"Brought from: http:\/\/salearningschool.com\/displayArticle.php?table=Articles&articleID=1117&title=Debugging%20in%20.Net,%20(XML%20Web%20Services) Just listing some related notes. Tools: DbgClr -GUI Based, CorDbg - command line based You can use the debug menu. Start, Step Into, Step Over, New Breakpoint options - as available in most Good to great IDEs for debugging Watch Window: Check the values of variables and\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":69920,"url":"http:\/\/bangla.sitestree.com\/?p=69920","url_meta":{"origin":70289,"position":5},"title":"Basics of Exception Handling in .Net #19","author":"Author-Check- Article-or-Video","date":"August 22, 2021","format":false,"excerpt":"Basics of Exception Handling in .Net Why exception handling? In your applications, unexpected error situations may occur that are out of your appication scope and your application logic. These are actually external to your application. For example, while you are reading a file from hard drive, the file may not\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/70289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=70289"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/70289\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=70289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=70289"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=70289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}