ASP.NET Skinnable Template Site
Erik Porter has posted a great example of how to build a "skinnable" site in ASP.NET here: http://weblogs.asp.net/eporter/posts/39571.aspx. He provides code in VB.NET and C#. The example is very basic, very readable, and not cluttered up with so many features that you will find it hard to pick out the bits you want to learn. It doesn't come with any documentation, but as I said, the code is very short and sweet, and you should have no trouble tracing through what he's done. If you've been wanting to build an ASP.NET site with base pages, templates, skins, etc and found...
In this post I'll be discussing a "trick" that will: enhance your coding experience while using Visual Studio (.old and .NET) enhance your email reading experience take at least 1 year worth of age from the perceived age of your PC get you a higher score on your favorite game So, what is this amazing trick, that will affect so many things? Clean your mouse! Seriously, when was the last time you did? Ugh.. :)
Remote Development Trick
Here's one of those tricks that I'm sure I wouldn't need if I knew a bit more about what the heck I'm doing, but it helps me nonetheless.... A typical scenario for me, is that I get an assignment to work on a project for some new client, and I create the database on my laptop, and begin work. Sooner or later they give me connection information for the "real" server where I will be deploying to. That's when the fun begins :) Out of habit, my local Enterprise Manager logs in to my local SQL Server (on the laptop)...
ConnectionString Trick (ASP.NET)
Like lots of people, I've wanted to store my ConnectionString in the web.config file. Again, like lots of people, I have different ConnectionStrings, one for the "live" server, one for the "development" server, and yet another for the "reporting" server. I'm sure many of you have the same thing. So then, you do development using the appropriate ConnectionString. Then when you deploy, how do you switch the ConnectionString to the new one? What I do, is in my web.config file I have quite a few parameters, not just ConnectionString. Like this: LiveWebServerName, LiveServerConnectionString, DevServerConnectionString, ReportServerConnectionString, etc. Then, in the application...
So, today I got a database .BAK file, and had to restore it into my server, where it had never been before. Having no documentation or information at all about the database, I went for it... Pretty straightforward: 1) Create the database. 2) Restore over it from the .BAK file. We don't need their old users or permissions, we just wanted to start working with the data. Except we found that one user was owner of all the tables, views, and procedures. That user of course had no login at the server level. I created the login, but could find...