I tried to edit a GridView in one of the pages of my site, topics.aspx. I decided to change the DataSourceID, from the one I put in design view on the grid view, with a custom one, following this tutorial
I COPIED and PASTED the exact SqlConnection from the register.aspx.cs page, which is
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
as a private field in topic.aspx.cs.
Suddenly, my register page doesn't work anymore. The "SqlConnection" in
call is "ambigous" between
I undid everything I did, obviously. My last resort is to delete topics.aspx and topics.aspx.cs altogether, but... will it work then? I highly doubt did.
I don't know what i did wrong, I only copied and pasted a line of code, and suddenly, my register.aspx and login.aspx don't work anymore. What is the problem?
The imports I am using are
If your connection string doesn't use Integrated Security = true you can try SqlConnection(String, SqlCredential) or just call default constructor