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.
Friday, October 13, 2006
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);
}
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";
}
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();
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.
- 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.
Thursday, September 14, 2006
3-Tier ASP.NET Architecture on MSDN
After reading and playing around with the steps mentioned in Scott Mitchell's excellent tutorial on 3-Tier ASP.NET Architecture (the first one is here), coupled with my use of the Web Application Projects addin to VS2005 (found here), I found out a few tips and tricks along the way.
As a summary, the abovementioned series of tutorials discuss steps on how to create the ff:
- A DataAccessLayer (DAL) using a typed/custom DataSet.
- A BusinessLogicLayer (BLL) that's layered on top of the DAL. This is basically a thin wrapper over the DAL.
- A Presentation Layer (PL) using ASP.NET with ObjectDataSource control calling the BLL.
As a summary, the abovementioned series of tutorials discuss steps on how to create the ff:
- A DataAccessLayer (DAL) using a typed/custom DataSet.
- A BusinessLogicLayer (BLL) that's layered on top of the DAL. This is basically a thin wrapper over the DAL.
- A Presentation Layer (PL) using ASP.NET with ObjectDataSource control calling the BLL.
Subscribe to:
Posts (Atom)
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...
-
After reading and playing around with the steps mentioned in Scott Mitchell's excellent tutorial on 3-Tier ASP.NET Architecture (the fir...
-
using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using S...
-
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 ...