<asp:Label ID="txtA" runat="server" Visible="false">时间:
<asp:TextBox ID="txtB" runat="server" ></TextBox>
</asp:Label>
if (!this.IsPostBack)
{
txtA.Visible=true;
}初次可以显示"时间:...";
但再次提交就没有了;
但是写成下边的形式就可以:<asp:Label ID="txtA" runat="server" Visible="false">时间:
</asp:Label>
<asp:TextBox ID="txtB" runat="server" Visible="false">></TextBox>
if (!this.IsPostBack)
{
txtA.Visible=true;
txtB.Visible=true;
}为什么?
解决方案 »
- 数据操作问题,高手进来看下
- html to word
- 程序和数据库部署到不同服务器,该如何选择?
- 我现在有个软件产品,怎样能给这个产品加上序列号
- 急急急:vs2003是否可以用vs2005treeview控件?怎么用?谢谢50分在线
- Reporting Server 只可以安装在默认站点下吗?
- 怎样才能将本页面的一个数组或对象(服务端)送到本页的javascript代码里啊?up有分
- excel绑定到datagrid的问题????大家帮帮
- 求助:asp.net 读取服务器端word文件到web页面
- 高手们进来帮小弟一个忙啊?
- SESSION页面之间传递变量的问题
- asp.net +oracle 存储blol类型问题
if (!Page.IsPostBack)
{
txtA.Visible=true;
txtB.Visible=true;
}
<asp:TextBox ID="txtB" runat="server" ></TextBox>
</asp:Label>
这样的"嵌套",即使能过,也强烈反对这样的写法.