Author: Qasimali84 | Posted on: 1/4/2010 4:05:55 AM | Views : 544

Dear Expert
I have usercontrol to create a new record/edit an existing record. The usercontrol have two constructors. one for "Create new record " and other for Load existing record for edit. When page have id in query string then load existing record for edit constructor execute otherwise create new rocord constructor executes.
The following is the code behind of usercontrol ("ContractControl")
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace DynamicForms.Portal.Controls
{
public partial class ContractControl : System.Web.UI.UserControl, IContract
{
protected bool _createMode;
 
public ContractControl()
{
_createMode = true;
this.Save += new EventHandler(ContractControl_Save);
this.Cancel += new EventHandler( ...

Go to the complete details ...