我网页上所有的Click和Change事件反应太慢了,但显示数据又不慢.
这是其中一个Click事件代码:protected void menu1_Click(object sender, EventArgs e)
{
if (DropDownList1.Visible == false)
{
DropDownList1.Visible = true;
DropDownList2.Visible = false; topmenu1.Attributes.Clear();
topmenu.Attributes.Clear();
topmenu.Attributes.Add("class", "top_menut");
topmenu1.Attributes.Add("class", "top_menut1");
topmenu1.Attributes.Add("onmouseover", "menu_over1(this);");
topmenu1.Attributes.Add("onmouseout", "menu_out1(this);");
}
}可能会有哪些方面的问题呢?
这是其中一个Click事件代码:protected void menu1_Click(object sender, EventArgs e)
{
if (DropDownList1.Visible == false)
{
DropDownList1.Visible = true;
DropDownList2.Visible = false; topmenu1.Attributes.Clear();
topmenu.Attributes.Clear();
topmenu.Attributes.Add("class", "top_menut");
topmenu1.Attributes.Add("class", "top_menut1");
topmenu1.Attributes.Add("onmouseover", "menu_over1(this);");
topmenu1.Attributes.Add("onmouseout", "menu_out1(this);");
}
}可能会有哪些方面的问题呢?
解决方案 »
- 如何将后台程序中变量的值传送给前台JAVA脚本程序里去
- ASP.NET 如何设置超时自动注销用户?
- 急!!!
- 注册时,怎样才能在选中了服务协议的checkbox框后才能点击提交按钮?
- 怎么设置button控件的快捷键是ctrl+Z
- 很急的一个问题啊(急!在线等)
- 在自定义控件设计期间得到的当前页面的控件.如何在控件中的到这些控件的值?
- 求高手帮忙,教我做个分页功能出来!小弟在此感激不尽。
- 在datagrid中怎么样根据选中的CHECKBOX来进行当前数据库的更新??在线等,急!!!
- 论坛里,怎么原封不动记录用户的回复(字体、超级链接等),入库,再取出来照原样显示?
- 求助:关于web.config 连接字符串的跨项目使用问题
- asp.net 的_blank _parent _search _self _top 有什么区别
是不是数据量特别大?
topmenu.Attributes.Add("class", "top_menut");
topmenu1.Attributes.Add("class", "top_menut1");
topmenu1.Attributes.Add("onmouseover", "menu_over1(this);");
topmenu1.Attributes.Add("onmouseout", "menu_out1(this);");把上面的代码一行行注释掉以后再执行,就知道是哪一行慢了。
然后再把那行调用的代码贴出来看看。
<div class="top_menut" runat="server" id="topmenu1"></div>
因为我的登录也很慢,
就连执行这句也很慢:
protected void btnreg_Click(object sender, EventArgs e)
{
ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "s", "alert('提示')", true);
}