Thursday, September 18, 2008

defun

I used to think it's quite strange how this LISP keyword sounds like. I still do. Does this mean to "remove the fun out of" programming? :-)

Tuesday, December 18, 2007

"Control cannot be created because Visual Studio cannot find the control’s type in the control assembly"

I just got a new machine, an Acer laptop with enough bells and whistles to make a developer happy (Core 2 Duo, 2GHZ, 2 GB RAM). As usual I test drive it on a Web Application Project I was working on in VS 2005. The source files came from an old laptop of mine. The new laptop has been painstakingly updated with all the required patches, and Service Packs, both for the OS (SP2 for WinXP) and the VS 2005 (SP1). I even installed the .NET Framework in sequence (1.1 and its SP, 2.0 and its SP; no .NET Framework 3 though; I have no need for it yet).


Friday, October 13, 2006

Intercepting Calls to Functions of a Typed Dataset

One of the things that we need to implement when doing any web project, whether in classic ASP or in ASP.NET, is how to log the calls to the database portion of our application. This is necessary so that we will be able to monitor the SQL statements that our application is executing at run time. This helps in easing up a lot of problems when troubleshooting production code.


Saturday, October 07, 2006

ASP.NET TabbedWizard Control (WizardBasePage.cs)

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace MSJ.BaseControl
{
public abstract class WizardBasePage : System.Web.UI.Page
{
public abstract Wizard Wizard { get; set;}

protected void Page_Init(object sender, EventArgs e)
{
GetTabbedWizardBase().InitPartnerControls(this);
}


ASP.NET TabbedWizard Control (TabbedWizardEnumsAndConstants.cs)

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace MSJ.Utility
{
internal class WizardConstants
{
public static readonly string WebConfigKey_WizardStepIDPrefix = "WizardStepID";
}


ASP.NET TabbedWizard Control (TabbedWizardBase.cs)

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MSJ.Utility;
using MSJ.BaseControl;

namespace MSJ.Controls
{
public abstract class TabbedWizardBase : System.Web.UI.UserControl
{
protected WizardBasePage _myPage = null;

#region -- Abstract Functions -- For Implementation of Inheritors --
/// <summary>
/// Resets the menu images to disabled mode.
/// </summary>
protected abstract void ResetMenuImagesToDisabled();


ASP.NET TabbedWizard Control (Putting It All Together)

1. Put the ff in your VS2005 web site/application project:
- TabbedWizardBase.cs
- WizardBasePage.cs
- TabbedWizardEnumsAndConstants.cs
- alternately, you can download the zip file here in my MSN group. (Unfortunately, you can not upload a file in a blog. Membership might be required to access it)
2. Create an "images" subfolder and put all your images there
3. Add a Web User control (say, MyTabbedControl) in your project. This will be the visible portion of your tab control.
- Inherit it from TabbedWizardBase as in the code below.


What a line of code

I didn't know this line of code (in any language) will make sense but apparently it does: auto l = [](){}; Look at all those bracke...