Welcome to the Digital Tool Factory blog

Backend web development in Atlanta GA

How to fix problems with Linq and the Entity Framework

The Problem: You attempt to do a query using Linq To Entities and your code does not work. The Cause: For reasons unknown, Linq to Entities has different operators than Linq To Sql. The Solution: Call your initial query/pull and us .ToList() on it before you run any of the problem operators – this fixes […]

How to fix problems uploading images in asp.net mvc 3/razor

The Problem: You are attempting to create create an asp.net mvc 3 page with razor that uses an upload control.  You try to upload an image and all you get is a “server not available” error.  Not very descriptive it it? The Cause: ASP.net sets the default upload limit very low. The Solution: Raise the limit, just […]

How to do a cool flash notification message in asp.net mvc 3 in 6 easy steps

I pieced all of this together from various sources online, so the code is a bit rough, but here it is: 1.  Create a partial razor view, call it _NotifyBar.cshtml, it contains this: @if (Request.Cookies[“NotifyBar”]!=null) { @Request.Cookies[“NotifyBar”].Value.ToString() X var c = new HttpCookie(“NotifyBar”); c.Expires = DateTime.Now.AddDays( -1 ); Response.Cookies.Add( c ); } 2.  Put this […]

How to Fix the “Service Unavailable” problem in IIS

The Problem: For whatever reason, your website is displaying a white screen with “Service Unavailable” and nothing else. The Cause: There could be many causes, but the one I just discovered was that the application pool had shut down for no good reason. The Solution: In IIS, navigate to “Application Pools”, right click to bring […]

How to create a asp.net gridview hyperlink field with multiple querystring parameters

The Problem: You need to put a relatively complicated link (i.e. the link has more than one parameter) into an asp.net gridview column. The Cause: No cause really, you just need to know the exact syntax The Solution: <asp:HyperLinkField HeaderText=”” Text=”Download Your File” DataNavigateUrlFields=”CategoryID,FileID” DataNavigateUrlFormatString=”FileDownloader. aspx?catid={0}&file={1}” /> You can have as many fields as you like in the […]

An argument for .Net in startups – to wit, avoiding groupthink

I recently read Why Startups Could Use .NET, But Don’t and the original CEO Friday: Why we don’t hire .NET programmers post from Expensify.  For a quick summary Starting Fact: Startups are risk taking places Startups are founded by risk taking people Pros of .Net Great Tools Works together well .Net programmers know how to use the platform […]

Fix the problem and move on

I recently ate breakfast with a few other local business types (one the head of the best event staffing company in Atlanta) and one of them presented an interesting problem.  He told the story of a former staff member who had made what seemed (to him)  to be an obvious mistake.  He seemed to think […]

How to fix problems with asp.net mvc 3 charts and razor pages

The Problem: You attempt to use the super-cool new charting features in asp.net mvc 3, and all you get is compilation errors The Cause: You are using the old school System.Web.UI.DataVisualization.Charting.Chart namespace The Solution: Delete using System.Web.UI.DataVisualization.Charting.Chart and instead insert using System.Web.Helpers; If you are using the chart code in an actual razor page (and […]

Rural vs City life – or how much culture do you care to contribute?

I recently came across this Simple Dollar blog post – “Why I Prefer Living Rural” and largely agreed with it.  I did have two quibbles. There was no mention of privacy and anonymity, the two greatest things about living in the city.  It is impossible to keep your life exclusively yours in the county.  Lots […]

The five kinds of Facebook status updates

They are all some variation of the following: I have friends and we like to have fun! My possessions make me so happy! Join me in my outrage at a gross mis-characterization of a news story I found online While the number of things I have to say is at zero, my desire to talk is at 10.  Therefore […]