当前位置: 代码迷 >> ASP.NET >> 界面顯示切換的問題,如何控制?(50分送上)-近來看看~
  详细解决方案

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

热度:8617   发布时间:2013-02-25 00:00:00.0
界面顯示切換的問題,怎么控制?(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> ";
  相关解决方案