Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASP_Beginner needs help !

ASP_Beginner needs help !

Scheduled Pinned Locked Moved ASP.NET
csharpquestionc++htmlasp-net
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KEL3
    wrote on last edited by
    #1

    I need to create an web page interface for a database in ASP.NET with C# and I have some problems : 1. First of all how can I connect to the database and how can I make queries. Sould I use the "DataSource" control or is it better to connect with code only ? (The database is on my PC) 2. As I can see there are two types of buttons. The first is the standard that leads to write code in the *.aspx.cs file. The second is the HTML button that leads to write code in the *.aspx file. The first button however is invisible in my browser. Why is that ? If you could tell me how to connect to my database in an MFC project instead of ASP and how to make queries it would be nice too. I was really disapointed that noone in this site hasn't posted an article on this matter (Am I wrong?). Anyway, this is the best programming site there is. Any kind of help would be much appreciated.

    kostas KEL

    P C 2 Replies Last reply
    0
    • K KEL3

      I need to create an web page interface for a database in ASP.NET with C# and I have some problems : 1. First of all how can I connect to the database and how can I make queries. Sould I use the "DataSource" control or is it better to connect with code only ? (The database is on my PC) 2. As I can see there are two types of buttons. The first is the standard that leads to write code in the *.aspx.cs file. The second is the HTML button that leads to write code in the *.aspx file. The first button however is invisible in my browser. Why is that ? If you could tell me how to connect to my database in an MFC project instead of ASP and how to make queries it would be nice too. I was really disapointed that noone in this site hasn't posted an article on this matter (Am I wrong?). Anyway, this is the best programming site there is. Any kind of help would be much appreciated.

      kostas KEL

      P Offline
      P Offline
      Pradipta Basu
      wrote on last edited by
      #2

      Hi, It is not possible to write about details of Database connectivity in .NET in this reply. I am giving you a few hints. Using a good book and googling will show you the way. Important namespaces for connectivity and data related activity. System.Data.SqlClient - for Sql Server System.Data.OracleClient - for Oracle System.Data.Odbc - for other database. System.Data Please read about these namespaces. Read about SqlConnection, SqlCommand and SqlDataAdapter in System.Data.SqlClient. Similar classes also exist for other namespaces. Apart from it you need to know about DataSet, SqlDataReader etc.

      Pradipta Basu

      1 Reply Last reply
      0
      • K KEL3

        I need to create an web page interface for a database in ASP.NET with C# and I have some problems : 1. First of all how can I connect to the database and how can I make queries. Sould I use the "DataSource" control or is it better to connect with code only ? (The database is on my PC) 2. As I can see there are two types of buttons. The first is the standard that leads to write code in the *.aspx.cs file. The second is the HTML button that leads to write code in the *.aspx file. The first button however is invisible in my browser. Why is that ? If you could tell me how to connect to my database in an MFC project instead of ASP and how to make queries it would be nice too. I was really disapointed that noone in this site hasn't posted an article on this matter (Am I wrong?). Anyway, this is the best programming site there is. Any kind of help would be much appreciated.

        kostas KEL

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        KEL3 wrote:

        First of all how can I connect to the database and how can I make queries.

        Small question, big answer - people have written entire books answering that question. Get a book on ADO.NET. Personally, I use SqlConnection and SqlCommand and the Enterprise Libraries.

        KEL3 wrote:

        As I can see there are two types of buttons. The first is the standard that leads to write code in the *.aspx.cs file. The second is the HTML button that leads to write code in the *.aspx file. The first button however is invisible in my browser. Why is that ?

        I don't know. You need to post some code. The "standard" buttons work for me. Have you set any properties that would make it invisible?

        KEL3 wrote:

        If you could tell me how to connect to my database in an MFC project instead of ASP and how to make queries it would be nice too.

        Off topic - ask this in the C++ forum.

        KEL3 wrote:

        I was really disapointed that noone in this site hasn't posted an article on this matter (Am I wrong?).

        Umm.. Did you try searching for any? I typed in "connect database MFC" into the search facility here and I got back 36 possible articles that you might find useful.


        Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups