打印本文 打印本文 关闭窗口 关闭窗口
创建ASP.NET WEB自定义控件——例程2
作者:武汉SEO闵涛  文章来源:敏韬网  点击数3501  更新时间:2009/4/23 10:43:49  文章录入:mintao  责任编辑:mintao
              this.pnlFrame.RenderBeginTag(output);//输出Panel控件

             

     //在Panel中绘制表格

              output.AddAttribute(HtmlTextWriterAttribute.Border,"0");

              output.AddAttribute(HtmlTextWriterAttribute.Cellpadding,"0");

              output.AddAttribute(HtmlTextWriterAttribute.Cellspacing,"0");

              output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Width,"100%");

              output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Height,"100%");

              output.AddAttribute(HtmlTextWriterAttribute.Bgcolor,this._backColor.Name);

              output.RenderBeginTag(HtmlTextWriterTag.Table);

             

              output.RenderBeginTag(HtmlTextWriterTag.Tr);

              output.RenderBeginTag(HtmlTextWriterTag.Td);

              //在表格中添加Label控件

              this.lblUserName.ForeColor = this._fontColor;

              this.lblUserName.RenderControl(output);

              output.RenderEndTag();

              output.RenderBeginTag(HtmlTextWriterTag.Td);

              //在表格中添加TextBox控件

              this.txtUserName.RenderControl(output);

              output.RenderEndTag();

              output.RenderEndTag();

              output.RenderBeginTag(HtmlTextWriterTag.Tr);

              output.RenderBeginTag(HtmlTextWriterTag.Td);

              //在表格中添加Label控件

              this.lblPassWord.ForeColor = this._fontColor;

              this.lblPassWord.RenderControl(output);

              output.RenderEndTag();

              output.RenderBeginTag(HtmlTextWriterTag.Td);

//在表格中添加TextBox控件

              this.txtPassWord.RenderControl(output);

              output.RenderEndTag();

              output.RenderEndTag();

              output.RenderBeginTag(HtmlTextWriterTag.Tr);

              output.AddAttribute(HtmlTextWriterAttribute.Align,"right");

              output.RenderBeginTag(HtmlTextWriterTag.Td);

              //在表格中添加Button控件

              this.submitButton.RenderControl(output);

              output.RenderEndTag();

              output.AddAttribute(HtmlTextWriterAttribute.Align,"center");

              output.RenderBeginTag(HtmlTextWriterTag.Td);

              //在表格中添加Button控件

              this.clearButton.RenderControl(

上一页  [1] [2] [3] [4] [5] [6]  下一页

打印本文 打印本文 关闭窗口 关闭窗口