| | |
Database Connection in Visual Studio 2005
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Nov 2006
Posts: 18
Reputation:
Solved Threads: 0
I developed a web interface using ASP.NET and a database using SQL Server 2005. I created connection to database using SqlDataSource control. I also used GridView control to display data. Using Visual Studio I can see the query results using a browser on a local machine. What I want now is to access the database (queries) remotely via the internet. So I need to create a button on the web interface such that when I click the button, I should then be taken to the database. (If possible I would like to make the link secure so that when the home page is accessed, and then the button is clicked, before you access the database you supply password (or username and password)). Please give me the code for this, or step by step guide to achieving this. Many thanks.
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
to get the grid view to display the data then just bind the datasource you created to the grid (you can do it in the form designer in VS2005
To protect it so only logged in people can see it, either protect the whole page (use webconfig to protect different areas of your site) or use a login view control and place the grid in the logged in view.
To protect it so only logged in people can see it, either protect the whole page (use webconfig to protect different areas of your site) or use a login view control and place the grid in the logged in view.
•
•
Join Date: Jan 2006
Posts: 275
Reputation:
Solved Threads: 11
if you have bound the datagrid to the datasource and have insert, update and delete commands in your data source just set allowedit and allowdelete = true for the gridview and it will take care of it all for you. You need something seperate to add and i use the detailsview with defaultmode set to insert and bound to the same datasource.
If you want more control over the gridview when edititng etc change each bound field into a template field and then change the item, edititem and any other templates you want.
If you want more control over the gridview when edititng etc change each bound field into a template field and then change the item, edititem and any other templates you want.
![]() |
Similar Threads
- Visual Studio 2005 (ASP.NET)
- Visual Studio 2005 (ASP.NET)
- Visual Studio 2005 & POSIX threads (C)
- Visual Studio 2005 Launch Poll (C#)
Other Threads in the ASP.NET Forum
- Previous Thread: Making ASP.Net pages better looking
- Next Thread: GetSelectedIndex Datagrid? Dropdownlist
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist development dgv dropdownlist dropdownmenu dynamically edit fileuploader fill flash flv formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news objects opera panelmasterpagebuttoncontrols redirect registration relationaldatabases reportemail rotatepage schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice youareanotmemberofthedebuggerusers





