System.Web.Configuration.WebConfigurationManager.GetSection C# (CSharp) Method

GetSection() public static method

public static GetSection ( string sectionName ) : object
sectionName string
return object
		public static object GetSection (string sectionName)
		{
			HttpContext context = HttpContext.Current;
			return GetSection (sectionName, GetCurrentPath (context), context);
		}

Same methods

WebConfigurationManager::GetSection ( string sectionName, string path ) : object
WebConfigurationManager::GetSection ( string sectionName, string path, HttpContext context ) : object

Usage Example

            internal ApplicationSettings()
            {
#pragma warning disable 0436
                ScriptingJsonSerializationSection section = (ScriptingJsonSerializationSection)
                                                            WebConfigurationManager.GetSection("system.web.extensions/scripting/webServices/jsonSerialization");
#pragma warning restore 0436

                if (section != null)
                {
                    _recusionLimit = section.RecursionLimit;
                    _maxJsonLimit  = section.MaxJsonLength;
                    _converters    = section.Converters.CreateConverters();
                }
                else
                {
                    _recusionLimit = (int)_propRecursionLimitLimit.DefaultValue;
                    _maxJsonLimit  = (int)_propMaxJsonLength.DefaultValue;
                    _converters    = new JavaScriptConverter[0];
                }
            }
All Usage Examples Of System.Web.Configuration.WebConfigurationManager::GetSection