Monday, March 26, 2012

Newbie question - Best practices for local/remote development?

Excuse me, I'm a relative newbie.

My question: What's the best practice for developing locally and then uploading to a production web site?"

Here's my plan:

I will use ASP.NET 2.0. I want to use Visual Web Developer 2005 Express Edition to develop locally using SQL Server 2005 Express Edition (.mdf file).

Then I want to upload my changes to a web site that uses the full version of SQL Server 2005 (not the Express Edition.)

I know how to upload my .aspx files to the remote site using Visual Web Developer.

But how should I handle my data? I imagine I can keep a little test data in my local .mdf database, and then just make sure the tables on the remote SQL Server always exactly mirror what I've got locally.

Then I just upload any changed .aspx files, which should work both locally and remotely.

Is this the best way? Or will I have to every time first change something in my .aspx files, to handle the data connection difference between my local db to the remote db?

Much ThanksThe convention is to store your database ConnectionString in the Web.Config file. Then you will only have one place to change it. See http://www.dotnetjohn.com/articles.aspx?articleid=3

No comments:

Post a Comment