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.

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.

I use visual studio 2005,sqlce & datagrid to view and edit data but I couldn't add or edit data in datagrid
would u pls. help me

thanks

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.