C# ASP.NET SQL SERVER
  • Tue
    26
    May 09

    ASP.NET MVC Output Caching

    I've found what I believe to be a bug in ASP.NET MVC's caching model inasmuch as it appears to be caching GET's when caching is not specified. However, even though I think that it's a bug it's way more likely that this is something that I haven't understood or something that I've done wrong: The first...

    Continue reading "ASP.NET MVC Output Caching"

  • Fri
    22
    May 09

    Normalizing Email Addresses

    I was going to write a post here describing this function, why I wrote it, and what it does. But then I re-read the comments that I'd added to the function and the examples I'd included in the code and said "Hey, this is perfectly documented and doesn't need any further explanation." /// <summary>...

    Continue reading "Normalizing Email Addresses"

  • Tue
    19
    May 09

    VS2010 Beta now available

    Jason Zander has just written Announcing VS2010 / .NET Framework 4.0 Beta 1 in his blog and I have just read it. I look forward to moving to VS2010 and can see that it will have productivity benefits but I'm not going to rush out and install it and definitely not try the beta - it just doesn't have that...

    Continue reading "VS2010 Beta now available"

  • Mon
    18
    May 09

    Which button was clicked in the ASP.NET MVC View?

    In an ASP.NET MVC view you might have multiple "submit" buttons inside a <form> such as: <% using (Html.BeginForm()) {%> <fieldset> <p> <input type="submit" value="Create" name="create" /> <input type="submit" value="Cancel"...

    Continue reading "Which button was clicked in the ASP.NET MVC View?"

  • Sun
    17
    May 09

    HP MediaSmart Windows Home Server

    I recently bought this HP MediaSmart Windows Home Server from Amazon: Which image do you think looks like it was more professionally produced? The one that I took above with my digital camera or the Amazon image below? You can see that I have the bottom 3 drive bay lights lit up because I don't have...

    Continue reading "HP MediaSmart Windows Home Server"

  • Sun
    17
    May 09

    Unable to reach NetBIOS name

    Just been trying to troubleshoot why I couldn't ping any of the other computers on my network from one of my laptops. I still haven't fully solved the problem but I've managed to get the piece of software to work that I needed to get to work by following an excellent tip from amcmillan after asking "...

    Continue reading "Unable to reach NetBIOS name"

  • Thu
    14
    May 09

    Professional ASP.NET MVC 1.0

    Just bought and now reading Professional ASP.NET MVC 1.0 by Rob Conery, Scott Hanselman, Phil Haack, Scott Guthrie. I don't often buy computer books but I read the first chapter from a PDF that is available online and was suitably impressed with it and since I am working in ASP.NET MVC knew I needed...

    Continue reading "Professional ASP.NET MVC 1.0"

  • Thu
    07
    May 09

    Setting up a dropdown list in ASP.NET MVC

    When adding a dropdownlist to a view in MVC there are two approaches that I've taken so far. Both of these approaches involve the same snippet of code in the view: <% = Html.DropDownList("ModelData")%> ModelData is the item in the ViewData[] collection that holds your list. You set this...

    Continue reading "Setting up a dropdown list in ASP.NET MVC"

  • Thu
    07
    May 09

    Yield return in C#

    I was reading some of the sample code that comes with the Professional ASP.NET MVC 1.0 book and came across the yield return statement which I've seen before but never used. It appears to be mostly syntactic sugar but may make the code more readable so I'm going to try and start using it to see if it...

    Continue reading "Yield return in C#"

  • Wed
    29
    Apr 09

    Security Vulnerability

    Can you see the security vulnerability in the following snippet of code? string returnValue = String.Empty; string sql = "select description from products where prodID = '" + Request.Params["pid"] + "';"; SqlCommand sqlcmd = new SqlCommand(sql); sqlcmd.Connection = sqlConn;...

    Continue reading "Security Vulnerability"