I normally use PHP/MySQL but today I'm making an ASP.net web application for work and visual studio tries (at least to my understanding) to hard to make it easy by providing menus and GUI's that writes code for you.
I searched Google for examples of ASP.NET using C# for making SQL driven web pages, but I wasn't able to find something helpful, mostly forums of broken code and people wondering what was wrong or tutorials that show you how to use the menus to work with data. (I tried this, it was to confusing I would rather work with code)
Pretty much if someone could post sample code of how to:
1 ) Connect to a database and display a println for sucess/error (so I can test my own)
2.) Run a simple query (SELECT * FROM database)
3.) Show how to structure that data so it can be displayed (so it can be binded to a listbox or outputted to plain text)
I'm not asking someone to write it for me, but if you have code or know of a tutorial that can illustrate the basics of running SQL queries/displaying results that would help me out greatly. I work far better by finding working code, and then playing with it to see how it works.
I searched Google for examples of ASP.NET using C# for making SQL driven web pages, but I wasn't able to find something helpful, mostly forums of broken code and people wondering what was wrong or tutorials that show you how to use the menus to work with data. (I tried this, it was to confusing I would rather work with code)
Pretty much if someone could post sample code of how to:
1 ) Connect to a database and display a println for sucess/error (so I can test my own)
2.) Run a simple query (SELECT * FROM database)
3.) Show how to structure that data so it can be displayed (so it can be binded to a listbox or outputted to plain text)
I'm not asking someone to write it for me, but if you have code or know of a tutorial that can illustrate the basics of running SQL queries/displaying results that would help me out greatly. I work far better by finding working code, and then playing with it to see how it works.