首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

界面顯示切換的問題,如何控制?(50分送上)-近來看看~

2012-01-11 
界面顯示切換的問題,怎么控制?(50分送上)---近來看看~~~~同一個位置,放置兩部分(界面控件),根據查詢條件,

界面顯示切換的問題,怎么控制?(50分送上)---近來看看~~~~
同一個位置,放置兩部分(界面控件),根據查詢條件,隱藏一個,顯示一個???

因為我發現在頁面上好象不能重疊控件的擺放~~~

如何控制???

[解决办法]
设置控件Visible= "false "就是隐藏了为 "true "则显示
[解决办法]
如:
/// <summary>
/// 根据下载和演示标识得到页面显示的TABLE
/// </summary>
/// <param name= "showSing "> 演示标识 </param>
/// <param name= "downSing "> 下载标识 </param>
/// <returns> 字符串 </returns>
protected string GetHtmlTB(int showSing, int downSing)
{
string strTableHtml = " ";
if (showSing == 0 && downSing == 0)
{//无下载无演示
strTableHtml = " <table width=\ "80%\ " border=\ "0\ " align=\ "center\ " cellpadding=\ "0\ " cellspacing=\ "0\ "> <tr> ";
strTableHtml += " <td align=\ "center\ " width=\ "30%\ " style=\ "height: 16px\ "> <img src=\ "../Images/shop/buy.gif\ " width=\ "33\ " height=\ "16\ " /> </td> </tr> </table> ";
}
else if (showSing == 0 && downSing == 1)
{ //有下载无演示
strTableHtml = " <table width=\ "60%\ " border=\ "0\ " align=\ "center\ " cellpadding=\ "0\ " cellspacing=\ "0\ "> <tr> ";
strTableHtml += " <td align=\ "center\ " width=\ "50%\ " style=\ "height: 16px\ "> <img src=\ "../Images/shop/download.gif\ " width=\ "33\ " height=\ "16\ " /> </td> ";
strTableHtml += " <td align=\ "center\ " width=\ "50%\ " style=\ "height: 16px\ "> <img src=\ "../Images/shop/buy.gif\ " width=\ "33\ " height=\ "16\ " /> </td> </tr> </table> ";
}
else if (showSing == 1 && downSing == 0)
{//有演示无下载
strTableHtml = " <table width=\ "60%\ " border=\ "0\ " align=\ "center\ " cellpadding=\ "0\ " cellspacing=\ "0\ "> <tr> ";
strTableHtml += " <td align=\ "center\ " width=\ "50%\ " style=\ "height: 16px\ "> <img src=\ "../Images/shop/show.gif\ " width=\ "33\ " height=\ "16\ " /> </td> ";
strTableHtml += " <td align=\ "center\ " width=\ "50%\ " style=\ "height: 16px\ "> <img src=\ "../Images/shop/buy.gif\ " width=\ "33\ " height=\ "16\ " /> </td> </tr> </table> ";
}
else
{
strTableHtml = " <table width=\ "80%\ " border=\ "0\ " align=\ "center\ " cellpadding=\ "0\ " cellspacing=\ "0\ "> <tr> ";
strTableHtml += " <td align=\ "center\ " width=\ "33%\ " style=\ "height: 16px\ "> <img src=\ "../Images/shop/show.gif\ " width=\ "33\ " height=\ "16\ " /> </td> ";
strTableHtml += " <td align=\ "center\ " width=\ "33%\ " style=\ "height: 16px\ "> <img src=\ "../Images/shop/download.gif\ " width=\ "33\ " height=\ "16\ " /> </td> ";


strTableHtml += " <td align=\ "center\ " width=\ "34%\ " style=\ "height: 16px\ "> <img src=\ "../Images/shop/buy.gif\ " width=\ "33\ " height=\ "16\ " /> </td> </tr> </table> ";
}
return strTableHtml;
}
[解决办法]
放在一起就行了哦

隐藏的那个,空间会留出来,被显示的那个占位
[解决办法]
panel
[解决办法]
放2个button
if(条件)
{
button1.visible=true;
button2.visible=false;
}
else
{
button2.visible=true;
button1.visible=false;
}
[解决办法]
放在一起就行了哦

隐藏的那个,空间会留出来,被显示的那个占位
================================================
RIGHT

你的页面的document的属性pageLayout=FlowLayout的话这样就行了
如果不是这样,那么用CSS定位也可以
[解决办法]
狂顶

热点排行