unable to set connectionstring property of Sqldatasource dynamically
-
unable to set connectionstring property of Sqldatasource used with gridView dynamically in asp.net 2.0 using c# after using it getting Exception :The connection name 'ConnectionString' was not found in the applications configuration or the connection string is empty. in syntax <%$ConnectionStrings:ConnectionString%> I'm thinking string after : is the key used in web.config file is it correct? Please guide what is gone wrong? following is the code snippet:
yog hui gfgh kgdgrt njjn hjgkn
-
unable to set connectionstring property of Sqldatasource used with gridView dynamically in asp.net 2.0 using c# after using it getting Exception :The connection name 'ConnectionString' was not found in the applications configuration or the connection string is empty. in syntax <%$ConnectionStrings:ConnectionString%> I'm thinking string after : is the key used in web.config file is it correct? Please guide what is gone wrong? following is the code snippet:
yog hui gfgh kgdgrt njjn hjgkn
-
Does your web.config have a ConnectionString with the name 'ConnectionString'? Because the code you provided (though only visible in html source) assumes so.
thank you Szukuro for reply. Yes, web.config have a ConnectionString with the name 'ConnectionString' set as key name . now i tried with another syntax as follows in aspx page ConnectionString="ConnectionStrings:ConnectionString" This is not giving exception but dat is not getting bound to the repeater. Please guide. Thank you.
yog hui gfgh kgdgrt njjn hjgkn