Posts

Showing posts from May, 2013

How to do SQL Source Control with TFS and WinMerge when you don'town "SQL Source Control"

I am a huge huge fan of Red Gate's SQL Source Control  and use it every day at work. On my side projects though I can't necessarily justify the $400 price tag (yet). So in the mean time, I am using the following somewhat painful process to source control my scripts against TFS. (Microsoft now has a hosted " Team Foundation Service " where you can host your code for free.) The current solution uses Visual Studio 2010, SQL Server 2008 R2 Express Management Studio, and WinMerge. Here's the process: Initial Load: In your TFS working folder, add a "DB" folder. For me this sits next to my Visual Studio Solution folder. Add the DB folder to Source Control. In SSMS, right-click on your database, choose Tasks > Generate Scripts and script out the entire database into your new DB folder. I create a file for each object. In Source Control, check all that in. You now have your database under version control, kinda. Add an additional sibling folder called DBC

Useful DevExpress Videos

This is a living list of DevExpress videos that I've personally found useful and so are probably good for other DevExpress beginners. Full Applications "Get Started" Mini Application http://www.devexpress.com/Support/Webinars/details.xml?id=GetStartedASPNET Key Takeaway: Introduction to several core DevEx ASP.Net controls: menus, other navigation, gridview, pivot reports and charts, an Outlook style scheduler, and an Access style banded  report wizard. ASPxGridView Grouping Introduction http://www.youtube.com/watch?v=G8AXvi3E_jE Key Takeaway: To automatically group by column X, set it's GroupIndex=0.

How to use Relative Paths in ASP.Net

Core issue: how to make relative paths work inside a Master Page that is inherited by children at different folder levels, especially when your production site lives at a deeper folder level than your development site. CSS Relative Paths in ASP.net -  using runat="server" in the head tag allows you to just use the ~ "web app root"  style referencing: <head runat="server"> <title>ABC System</title> <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" /> </head> Unfortunately this doesn't work on Javascript references, so unless you're referencing a permanent CDN you end up doing something funky inside the body tag: <body> <!-- This jquery script is outside head so we can use Page.ResolveURL. For some reason: - head: runat eq server is often required for various asp.net features - head: runat eq server resolves "~" style CSS references, but not JS - a code block