Click here to Skip to main content
13,248,343 members (36,766 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » Howto » Downloads


46 bookmarked
Posted 11 Apr 2005

Adding a ProcessContext to ASP.NET

, 11 Apr 2005
A simple and reliable way to build context into a multi stage process in ASP.NET.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace Base4.Web.UI.SimpleHazardApplication
	/// <summary>
	/// Summary description for WebForm1.
	/// </summary>
	public class HazardDetails : ProcessParticipantPage
		protected System.Web.UI.WebControls.Label lblPageDescription;
		protected System.Web.UI.WebControls.Label lblDescription;
		protected System.Web.UI.WebControls.Label lblSeverity;
		protected System.Web.UI.WebControls.Button btnNext;
		protected System.Web.UI.WebControls.TextBox txtTitle;
		protected System.Web.UI.WebControls.TextBox txtDescription;
		protected System.Web.UI.WebControls.TextBox txtSeverity;
		protected System.Web.UI.WebControls.Label lblTitle;
		private void Page_Load(object sender, System.EventArgs e)
			// Put user code to initialize the page here

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
			this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
			this.Load += new System.EventHandler(this.Page_Load);


		private void btnNext_Click(object sender, System.EventArgs e)
			string title = this.txtTitle.Text;
			string severity = this.txtSeverity.Text;
			string description = this.txtDescription.Text;
			ProcessContext["title"] = title;
			ProcessContext["severity"] = severity;
			ProcessContext["description"] = description;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Alex James
Web Developer
New Zealand New Zealand
My name is Alex James, a software architect and developer from Auckland, New Zealand. I have 10 years of business experience working on and managing IT projects. My team and I recently decided to open source Base4.NET: a very exciting tool for creating integrated business applications.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171114.1 | Last Updated 11 Apr 2005
Article Copyright 2005 by Alex James
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid