自定义控件里的表格为什么不能使用控件的属性?来指教一下
自定义控件里的表格为什么不能使用控件的属性?高手进来指教一下!
protected override void Render(HtmlTextWriter output)
{
StringBuilder builder = new StringBuilder( " ");
builder.Append( " <table width=\ " " + this.page_width + "\ " border=\ "0\ " cellspacing=\ "0\ " cellpadding=\ "2\ " align=\ "center\ " height=\ "22\ " BackColor=\ "red\ " > \n ");
builder.Append( "\t <tr> \n ");
builder.Append( " <td height=\ "22\ " width=\ "30%\ " align = \ "left\ "> ");
builder.Append( " <font color=\ "#000000\ "> ≡ " + this.table_Name + "≡ </font> ");
builder.Append( " </td> ");
builder.Append( "\t\t <td width=\ "70%\ "> ");
builder.Append( "\t\t <div align=\ "right\ "> \n ");
if (this.page_All != " ")
{
builder.Append( "\t\t\t[ <a href= " + this.page_All + "> " + PageAllString + " </a> ] \n ");
}
if (this.Page_Add != " ")
{
builder.Append( "\t\t\t[ <a href= " + this.Page_Add + "> "+PageAddString+ " </a> ] \n ");
}
if (this.Page_Search != " ")
{
builder.Append( "\t\t\t[ <a href= " + this.Page_Search + "> " + PageSearchString + " </a> ] \n ");
protected override void Render(HtmlTextWriter output)
{
StringBuilder builder = new StringBuilder( " ");
builder.Append( " <table width=\ " " + this.page_width + "\ " border=\ "0\ " cellspacing=\ "0\ " cellpadding=\ "2\ " align=\ "center\ " height=\ "22\ " BackColor=\ "red\ " > \n ");
builder.Append( "\t <tr> \n ");
builder.Append( " <td height=\ "22\ " width=\ "30%\ " align = \ "left\ "> ");
builder.Append( " <font color=\ "#000000\ "> ≡ " + this.table_Name + "≡ </font> ");
builder.Append( " </td> ");
builder.Append( "\t\t <td width=\ "70%\ "> ");
builder.Append( "\t\t <div align=\ "right\ "> \n ");
if (this.page_All != " ")
{
builder.Append( "\t\t\t[ <a href= " + this.page_All + "> " + PageAllString + " </a> ] \n ");
}
if (this.Page_Add != " ")
{
builder.Append( "\t\t\t[ <a href= " + this.Page_Add + "> "+PageAddString+ " </a> ] \n ");
}
if (this.Page_Search != " ")
{
builder.Append( "\t\t\t[ <a href= " + this.Page_Search + "> " + PageSearchString + " </a> ] \n ");