Server Error in '/' Application.

The ConnectionString property has not been initialized.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The ConnectionString property has not been initialized.

Source Error:


Line 33:     {
Line 34:         string theQ = "select * from table_state order by state_name asc";
Line 35:         gbl.Open();
Line 36:         SqlDataAdapter sda = new SqlDataAdapter(theQ, gbl);
Line 37:         DataTable dt = new DataTable();

Source File: e:\IndiaOnline Old Server Projects\wwwroot\wwwroot\panindia\indiaweather.in\Mausam\cities.aspx.cs    Line: 35

Stack Trace:


[InvalidOperationException: The ConnectionString property has not been initialized.]
   System.Data.SqlClient.SqlConnection.PermissionDemand() +6356272
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6342711
   System.Data.SqlClient.SqlConnection.Open() +258
   cities.gatherState() in e:\IndiaOnline Old Server Projects\wwwroot\wwwroot\panindia\indiaweather.in\Mausam\cities.aspx.cs:35
   cities.Page_Load(Object sender, EventArgs e) in e:\IndiaOnline Old Server Projects\wwwroot\wwwroot\panindia\indiaweather.in\Mausam\cities.aspx.cs:25
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062