VS2012 Web Deploy, Using Transforms For Connection String In Production (Web.Config)

  Introduction I should have learned this a long time ago.  I certainly have known about it since VS2010 when it was introduced, I’ve read about it multiple times, I just thought I did not have the time to learn it so for the past couple years, I’ve been making one web.config change after another and of course making all the stupid little mistakes we all make (I think) when we do things manually. So, in 25 minutes this morning, I updated my http://siliconvalley-codecamp.com site with Web.Config transforms so now, when I “publish” with Visual Studio 2012 I just pick the correct profile (either beta4 or svccprod) and when I do the publish command, I get the correct database connection strings.  svcodecamptest for beta4 and … Continue Reading

Using SASS and Compass to Solve 2 CSS files into 1 CSS File

I’m currently building a simple SenchaTouch app that includes a twitter stream.  The example CSS that came with the app was global  in nature.  That is, it set styles on all image tags, h2 tags, etc.  Here is what it looks like:   h2 { font-weight: bold; padding-bottom: 3px; } img { border-radius: 5px; float: left; } .tweet { font-size: 70%; margin-left: 60px; color: #333; min-height: 50px; } .x-list-item { border-top: 1px solid white; } .posted { float: right; } What this does is every img tag will get a float left.  Very bad!  So, I’ already using Sass (style with attitude) and compass in my app so all I need to do is wrap the code that actually uses … Continue Reading

HttpClient Verses WebClient with .Net and C#

I often find I do what I know over and over again and don’t look for new solutions if the old tried and true solution works.  At my last hackathon, I wrote an app the screen scraped the starbucks site.  I noticed when I looked at the site that a redirect happened after sign in.  My WebClient call did not follow the redirect.  I asked for help from a very bright Microsoft Azure guy (Josh Twist) who blogs at http://www.thejoyofcode.com/About_us.aspx.  Josh suggested switching to HttpClient and making sure to set the option that follows redirects. Perfect!  I’m hooked on HttpClient now forever. WebClient is now just in my rear view mirror. … Continue Reading

Microsoft’s ASP.NET MVC Lite, Building a TextReformatter With JsonResult

  Introduction   People often ask me if I use MVC or WebForms for my Microsoft ASP.NET projects.  I always tell them MVC, but I don’t use it in the classic way that most others do.  That is to say, I emit no html from my views, and for that matter really don’t even use views (with the exception of one view which is essentially my entire app.   People often refer to this as a SPA or Single-Page-Application. What this basically means is that my entire view is built with JavaScript (in my case Sencha’s ExtJS) and the only interaction with the server is to simply bring down Json results. In this post, I’m going to build a simple app following this principle. It’s purpose will be to take a big pile of text, chop … Continue Reading


Get every new post delivered to your Inbox

Join other followers: