第一次写,忘记注解,对不住.
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Data;
using System.XML;
namespace Grid
{
public class IDArgs : System.EventArgs
{
private string id;
//Constructor.
//
public IDArgs(string Id)
{
this.id =Id;
}
// The NumRings property returns the number of rings
// that the alarm clock has sounded when the alarm event
// is generated.
//
public string ID
{
get { return this.id ;}
}
}
///
/// Summary description for WebCustomControl1.
///
[DefaultProperty("Text"),
ToolboxData("<{0}:WebCustomControl1 runat=server>")]
public class WebCustomControl1 : System.Web.UI.WebControls.WebControl, IPostBackEventHandler
{
public string EditUrl
{
get
{
if(this.ViewState["EditUrl"]!=null) return (string)this.ViewState["EditUrl"];
else return "";
}
set
{
this.ViewState["EditUrl"]=value;
}
}
public string ExpandColumn
{
get
{
if(this.ViewState["ExpandColumn"]!=null) return (string)this.ViewState["ExpandColumn"];
else return "";
}
set
{
this.ViewState["ExpandColumn"]=value;
}
}
//set paging
public int IsPaging
{
get
{
if(this.ViewState["IsPaging"]!=null) return (int)this.ViewState["IsPaging"];
else return 0;
}
set
{
this.ViewState["IsPaging"]=value;
}
}
public int PageCount
{
get
{
if(this.ViewState["PageCount"]!=null) return (int)this.ViewState["PageCount"];
else return 0;
}
set
{
this.ViewState["PageCount"]=value;
}
}
public int CurrentPage
{
get
{
if(this.ViewState["CurrentPage"]!=null) return (int)this.ViewState["CurrentPage"];
else return 1;
}
set
{
this.ViewState["CurrentPage"]=value;
}
}
//set sort
public int IsSort
{
get
{
if(this.ViewState["IsSort"]!=null) return (int)this.ViewState["IsSort"];
else return 0;
}
set
<