Go Back
  • May 14

    Sitefinity: Easy SP Upgrades with DiffMerge

    Posted Under: General Programming Tags: Helpful Tools Sitefinity

    As part of the process of preparing the Sitefinity Toolkit 1.1 update for release later this weekend, I needed to upgrade my sites to the latest Sitefinity SP3 update.

    For those of you who've done this, you know it's MOSTLY a simple process, but can get tricky when copying the /Sitefinity folder files, because, like me, many of you probably customize or modify these files to meet your needs. Sitefinity addresses a lot of this by supporting external templates, but sometimes it's easier to just edit the files directly.

    However, this becomes a problem with every SP release because these ...

    Read More »

  • April 06

    Inserting a Duplicate DataRow to a DataSet

    Posted Under: General Programming Tags: C# DataSet

    While developing an online form, I came upon the need to insert two copies the results to a database, one for each of two options selected on the form. The only thing different between these entries would be this option, and of course, the autogenerated ID for the row's primary key.

    While I could simply call the Insert function of the TableAdapter twice, this method requires that each field be explicitly submitted as a parameter, and since the data is coming from textboxes, and there are about a dozen boxes on the page, that's a whole lot of textbox.Text.Trim() arguments!...

    Read More »

  • November 15

    Rounding to the Nearest Ten

    Posted Under: General Programming Tags: C#

    I'm not sure if the Microsoft .NET Framework has support for rounding to the nearest ten, hundreds, thousands, etc, so I built a quick snippet of code to accomplish this. The basic algorithm is to mod the value by 10 (can be modified to handle 100, 1000, etc), then if less than the median (in this case 5), subtract that from the original value. If the mod is greater than or equal to the median, we round up by adding the DIFFERENCE between the remainder and the rounding base (10 in this case). If there is a built in function, ...

    Read More »

  • January 24

    Editing The Datasource

    Posted Under: General Programming Tags: DataSet

    Ahh it's all coming back to me now... the headaches that is :P

    One thing that I would always forget how to do with the new asp.net 2.0 data controls is how to enable editing using the datasource. I set up the sql statements for select, insert, update, and delete, but only select would work. when I update something and save, it just reverts back...

    the problem is that I forgot to set the Datakeys property for the control which I want to edit. It must be set to the primary key of the table in order to enable "out ...

    Read More »