This is an example of a selection province and then uploading the event to the top layer of the control at the page processing event. The coarse portion is the entire upload event process. Upload events (exposed events), exposure properties, complex attribute management, style management, etc. are advanced topics for ASP.NET Server custom controls. using System; using System.Web; using System.Web.UI; using System.Data; using System.Data.SqlClient; using System.Web.UI.WebControls; using System.ComponentModel; using Yeno.EnBiz.News.Tools;
Namespace yeno.enbiz.news.controls {///
///
protected override void Render (HtmlTextWriter writer) {AddAttributesToRender (writer); writer.AddAttribute (HtmlTextWriterAttribute.Cellpadding, "5", false); writer.AddAttribute (HtmlTextWriterAttribute.Cellspacing, "0", false); writer.AddAttribute (HtmlTextWriterAttribute. Width, "100%", false; Writer.Renderbegintag (HTMLTextWritertag.Table);
Writer.renderbegintag (HTMLTextWritrtag.tr); _Province.RenderControl (Writer); Writer.Renderendtag ();
Writer.renderendtag ();} protected override void createchildControls () {if (! page.ispostback) {Controls.clear (); ClearChildViewState ();
_Province = new TableCell ();
CreateProvince ();