944,079 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 15661
  • ASP.NET RSS
Mar 9th, 2007
0

Database Connection in Visual Studio 2005

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
r_jack is offline Offline
18 posts
since Nov 2006
Mar 23rd, 2007
0

Re: Database Connection in Visual Studio 2005

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.
Reputation Points: 26
Solved Threads: 11
Posting Whiz in Training
f1 fan is offline Offline
275 posts
since Jan 2006
Mar 28th, 2007
0

Re: Database Connection in Visual Studio 2005

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
fkatan is offline Offline
3 posts
since Mar 2007
Mar 28th, 2007
-1

Re: Database Connection in Visual Studio 2005

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.
Reputation Points: 26
Solved Threads: 11
Posting Whiz in Training
f1 fan is offline Offline
275 posts
since Jan 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Making ASP.Net pages better looking
Next Thread in ASP.NET Forum Timeline: GetSelectedIndex Datagrid? Dropdownlist





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC