把HTML的控件改为服务器运行,然后进行循环foreach(Control con in this.Controls[1].Controls)
{
if(con is TextBox)//WEB的控件请改为HTML上的控件。
{
((TextBox)con).Text="";
}
if(con is ListBox)
{
((ListBox)con).Items.Clear();
}
}
{
if(con is TextBox)//WEB的控件请改为HTML上的控件。
{
((TextBox)con).Text="";
}
if(con is ListBox)
{
((ListBox)con).Items.Clear();
}
}
解决方案 »
- 如何在html 里批量实现支持c# 的 代码的 展开 缩进
- 命名空间的简单问题
- asp.net 循环读xml问题?
- 在学习Ajax的时候,遇到不懂的代码,请教!!!
- 麻烦大家帮我瞧瞧 这段代码有什么错误
- 如何做鼠标移上一个连接后显示一在显示出一张图片
- 思归大哥: 一个数据库填充treeview的问题,郁闷好久,快来帮忙!!!!!!其它高手来一样有给高分!!!!!!
- 如何做出csdn论坛左边树形列表效果?
- 关于身份验证中的授权用户和角色的问题
- 关于Socket的Receive问题。
- 这种数据统计sql语句如何写?
- 我用Microsoft Visual Studio .NET编辑DataGrid时怎么没找到HyperLinkColumn属性?
public void MyControls(System.Web.UI.ControlCollection cllObj)
{
foreach (Control ctl in cllObj)
{
if (ctl.ToString()=="System.Web.UI.HtmlControls.HtmlForm")
{//...}
}
}
<table>
<tr>
<td>aaa</td>
</tr>
</table>
</div>
Response.Write(TestDiv.Controls.Count.ToString());
<table>
<tr>
<td>aaa</td>
</tr>
</table>
</div>js:
document.all.TestDiv.childNodes.length