Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i connect data bases in web page ? 1

Status
Not open for further replies.

pratimapaudel

Programmer
Apr 23, 2007
3
US
Hi

I have a page Login.aspx, i want to connect the login page with the data base and verify the username and password. the table for the login page is tblusers which is in sql server 2005.

i know how to connect the database with windows application using SQL DataAdapter but i cannot drag the sql data adapter in web page,i tried by clicking right click and choose item but i can drag only in windows application not in the web application.

can anyone help me how to connect that data base in web page . but i need the SQL Data Adapter and SQL connection because i need these two(sqldataadapter1,sqlconnection1) in my web page to go furhter for my project, i am totally new programmer, so i am following the book , they are saying that drag sql data adapter to the web page but i cannot drag it so how i can do it?
what may be the alternate way to do this?
 
goto web.config

<configuration>
<add name="dbConName" connectionString="Data Source=server;uid=UserID;password=Password;Initial Catalog=Table;network=DBMSSOCN" providerName="System.Data.SqlClient"/>
</configuration>

k make sure you leave providerName="System.Data.SqlClient" it allows you to connect with your dataset.

add new item dataset whish will be .xsd file add new table adapter you will see the datasource we just added in the dropdown. From there just run your queries as needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top