关于速度的问题,在线等,立即结贴

时间:2020-11-28 04:29:29
我的程序中,比如说在内网发送EMAIL,在一个页面中有一个按纽是选择收件人,点一下,弹出另一个页面,在这个页面中选择下拉框中的部门和人员后,将选中的人员返回到上个页面中,就是这个功能中,在选择下拉框中的部门和人员时,速度很慢,请问是什么原因

23 个解决方案

#1


这个选择速度慢能重复么?这个下拉框中的数据多么?

#2


可以重复,有20个部门,选择部门后将部门的人员放在;一个列表框内

#3


是不是指事件回发执行速度很慢,曾经有遇到过这个的问题.后来发现是缓存的关系,比如ViewState,太大了,页面OnLoad事件执行得很慢.你测试一下你的ViewState会不会大?

#4


怎么测试?

#5


你页面里还有别的东西么?譬如CSS里的setExpression什么的?

#6


我没有用样式表

#7


我的OnLoad事件只执行一次,这个速度不慢,就是选择下拉框的时候,下拉框的人员出来太慢了

#8


浏览器->查看->查看源文件,搜索VIEWSTATE,看看是不是非常大。像下面这个大小算是正常的:

<input type="hidden" name="__VIEWSTATE" value="dDwxMDUzMjkwODY7dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47aTwyPjtpPDc+O2k8OD47aTw5PjtpPDEwPjtpPDExPjtpPDEyPjs+O2w8dDxwPHA8bDxUZXh0Oz47bDwyMDA1LjEwLjA2Oz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDzmmJ/mnJ/lm5s7Pj47Pjs7Pjt0PEAwPHA8cDxsPFNEOz47bDxsPFN5c3RlbS5EYXRlVGltZSwgbXNjb3JsaWIsIFZlcnNpb249MS4wLjUwMDAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5PDIwMDUtMTAtMDY+Oz47Pj47Pjs7Ozs7Ozs7Ozs+Ozs+O3Q8cDxwPGw8SW1hZ2VVcmw7PjtsPGYvaW1nL2RlcDIuZ2lmOz4+Oz47Oz47dDxwPHA8bDxJbWFnZVVybDs+O2w8Zi9pbWcvZGVwNC5naWY7Pj47Pjs7Pjt0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Tw3PjtpPDg+Oz47bDx0PDtsPGk8MD47PjtsPHQ8QDxNRjs+Ozs+Oz4+O3Q8O2w8aTwwPjs+O2w8dDxAPE1GODA4Mjs+Ozs+Oz4+O3Q8O2w8aTwwPjs+O2w8dDxAPEI3MzctNzAwOz47Oz47Pj47dDw7bDxpPDA+Oz47bDx0PEA85q2m5aS35bGxOz47Oz47Pj47dDw7bDxpPDA+Oz47bDx0PEA8MjMwMDs+Ozs+Oz4+O3Q8O2w8aTwwPjs+O2w8dDxAPFxlOz47Oz47Pj47dDw7bDxpPDA+Oz47bDx0PEA8XGU7Pjs7Pjs+Pjt0PDtsPGk8MD47PjtsPHQ8QDwyMzQwOz47Oz47Pj47dDw7bDxpPDA+Oz47bDx0PEA85Y6m6ZeoOz47Oz47Pj47Pj47Pj47Pj47Pj47Pj47bDxyZGlBcnI7cmRpQXJyO3JkaURlcDtyZGlDaXR5O3JkaUNpdHk7cmRpVGltZTs+PhCgvyluGKFf0x5hRyQirfHPvIef" />

#9


应该是客户端的原因,慢的可能性不会太多的,一是数据太多,二是网页需要动态计算,譬如引发脚本,特殊效果,或者CSS的setExpression等,建议把该页面在一个浏览器里单独打开,是不是还是慢,如果是,请把你的HTML码全部贴出来,包括CSS等

#10


HTML代码如下:
<%@ Page SmartNavigation="True" language="c#" Codebehind="mailzjsr.aspx.cs" AutoEventWireup="false" Inherits="goffice3._0.publics.mailzjsr" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>选择邮件接收人</title>
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body leftMargin="0" topMargin="0" MS_POSITIONING="GridLayout">
<form id="mailzjsr" method="post" runat="server">
<TABLE id="Table1" height="400" cellSpacing="0" cellPadding="0" border="0" runat="server">
<TR>
<TD style="BORDER-BOTTOM: #cfd8ea 1px solid" align="center" bgColor="#f2f6ff" colSpan="3"
height="74"><FONT face="宋体"><font color="black"><b>---- 请 选 择 人 员 ----
<asp:listbox id="ListBox1" runat="server" Visible="False" Width="38px"></asp:listbox></b></font></FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 127px" colSpan="3">
<TABLE id="Table2" style="WIDTH: 398px; HEIGHT: 128px" cellSpacing="0" cellPadding="0"
width="528" border="0" runat="server">
<TR align="center">
<TD style="BORDER-RIGHT: #ddd7bc 1px solid" width="40%" bgColor="#fffef2"><FONT face="宋体">
<table style="WIDTH: 80%; HEIGHT: 100%" cellSpacing="0" cellPadding="0" border="0">
<tr height="20%" width="100%">
<td><asp:dropdownlist id="dropdlblr" runat="server" AutoPostBack="True"></asp:dropdownlist></td>
</tr>
<tr height="80%" width="100%">
<td width="100%" height="80%"><asp:listbox id="SelBl" runat="server" Width="100%" Height="137px" SelectionMode="Multiple"></asp:listbox></td>
</tr>
</table>
</FONT>
</TD>
<TD style="WIDTH: 20%"><FONT face="宋体">
<table height="100%" cellSpacing="0" cellPadding="0" border="0">
<tr align="center">
<td><asp:imagebutton id="ButSel" runat="server" CausesValidation="False" ImageUrl="../images/img_xuanze.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr align="center">
<td><asp:imagebutton id="ButSelAll" runat="server" ImageUrl="../images/img_xuanzeall.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><asp:imagebutton id="ButDel" runat="server" ImageUrl="../images/img_del.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><asp:imagebutton id="ButDelAll" runat="server" ImageUrl="../images/img_delall.gif"></asp:imagebutton></td>
</tr>
</table>
</FONT>
</TD>
<TD style="BORDER-LEFT: #bcddc7 1px solid" width="40%" bgColor="#f6fef7"><FONT face="宋体">
<table style="WIDTH: 80%; HEIGHT: 100%" cellSpacing="0" cellPadding="0" border="0">
<tr height="20%" width="100%">
<td><asp:label id="Label2" runat="server">
<font color="red">已选择人员</font>
</asp:label></td>
</tr>
<tr height="80%" width="100%">
<td width="100%" height="80%"><asp:listbox id="SureLb" runat="server" Width="100%" Height="137px" SelectionMode="Multiple"
ForeColor="Red"></asp:listbox></td>
</tr>
</table>
</FONT>
</TD>
</TR>
<TR align="center">
<TD style="BORDER-RIGHT: #ddd7bc 1px solid" width="40%" bgColor="#fffef2"><FONT face="宋体">
<table style="WIDTH: 80%; HEIGHT: 100%" cellSpacing="0" cellPadding="0" border="0">
<tr height="20%" width="100%">
<td><asp:label id="Label1" runat="server" Width="80px" Height="6px" ForeColor="red">请选择组</asp:label></td>
</tr>
<tr height="80%" width="100%">
<td width="100%" height="80%"><asp:listbox id="listgroup" runat="server" Width="100%" Height="137px" SelectionMode="Multiple"></asp:listbox></td>
</tr>
</table>
</FONT>
</TD>
<TD style="WIDTH: 20%"><FONT face="宋体">
<table height="100%" cellSpacing="0" cellPadding="0" border="0">
<tr>
<td style="HEIGHT: 19px"><asp:imagebutton id="groupsel" runat="server" CausesValidation="False" ImageUrl="../images/img_xuanze.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><asp:imagebutton id="groupselall" runat="server" ImageUrl="../images/img_xuanzeall.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><asp:imagebutton id="groupdel" runat="server" ImageUrl="../images/img_del.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><asp:imagebutton id="groupdelall" runat="server" ImageUrl="../images/img_delall.gif"></asp:imagebutton></td>
</tr>
</table>
</FONT>
</TD>
<TD style="BORDER-LEFT: #bcddc7 1px solid" width="40%" bgColor="#f6fef7"><FONT face="宋体">
<table style="WIDTH: 80%; HEIGHT: 100%" cellSpacing="0" cellPadding="0" border="0">
<tr height="20%" width="100%">
<td><asp:label id="Label3" runat="server" Width="87px" ForeColor="Red">已选择组</asp:label></td>
</tr>
<tr height="80%" width="100%">
<td width="100%" height="80%"><asp:listbox id="suregroup" runat="server" Width="100%" Height="137px" SelectionMode="Multiple"
ForeColor="Red"></asp:listbox></td>
</tr>
</table>
</FONT>
</TD>
</TR>
<TR>
<TD style="BORDER-TOP: #cfd8ea 1px solid" align="center" bgColor="#f2f6ff" colSpan="3"
height="64"><asp:imagebutton id="ib_queding" runat="server" ImageUrl="../images/btn_queding.gif"></asp:imagebutton>&nbsp; 
&nbsp;&nbsp; <IMG style="CURSOR: hand" onclick="butDes_onclick()" alt="" src="../images/btn_quxiao.gif"></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</form>
<SCRIPT language="VBSCript">
'确定
sub butSelect_onclick()
dim str,strr
lens=document.all("SureLb").length-1
if lens=-1 then
else
for i=0 to lens
if i=0 then
strr=strr+document.all("SureLb").options(i).value
strp=strp+document.all("SureLb").options(i).text
else
strr=strr+","+document.all("SureLb").options(i).value
strp=strp+","+document.all("SureLb").options(i).text
end if 
next
str=str+strr+"&"+strp
  end if
  window.returnValue=str
  window.close()
end sub
'取消
sub butDes_onclick()
  window.returnValue=""
  window.close()
end sub
</SCRIPT>
</body>
</HTML>

#11


警告*8808一次,请别这么做

#12


在选择下拉框中的部门和人员时,速度很慢,你是不是每次都是从数据库中读取部门和人员数据填入下拉框。正确做法是第一次用到时读数据库,并保留在内存中,第二次及以后使用时直接从内存读取。

#13


我是on_load中将部门放在下拉框中,选择下拉框时将根据下拉框的值在表中取数据后绑定列表框

#14


浏览器->查看->查看源文件,搜索VIEWSTATE,看看是不是非常大。像下面这个大小算是正常的:
<input type="hidden" name="__VIEWSTATE" value="此处省略6048字节" />
------------------------------------------------------------------------
对不起,我应该这样回复。请saucer(思归)大哥把我原来那个回复删除,谢谢。

#15


我的代码中的value是一大串字符,如同你第一次那样,说明了什么,应该如何做呢?
<input type="hidden" name="__VIEWSTATE" value="一大串字符" />

#16


我是on_load中将部门放在下拉框中,选择下拉框时将根据下拉框的值在表中取数据后绑定列表框
------------------------------------------------------------------------------------
如果人员表的数据不是太多的话,比如在几千人到几万人之间,建议事先把数据库中人员表的“部门ID、姓名、E-Mail地址”等列读入一个静态的DataTable字段或Session中,然后人员列表框绑定DataView,再根据所选部门设置DataView的RowFilter属性为: "部门ID="+所选部门

#17


除非你的记录有很多,导致IE解释HTML时很慢.
你获取雇员的时候是不是通过视图,如果是用查询分析器看下视图执行结果.
最好把大概的代码贴出来.

#18


建议用Cache,可以让多人使用共享数据,提高速度!

#19


mycls.Fill("select nodeid,mc from 人员表 where parentid ='下拉框的植' order by order_id");
this.SelBl.DataSource =mycls.ds.Tables[0].DefaultView;

this.SelBl.DataBind();
mycls.Close();

#20


上面是选择下拉框后执行的代码

#21


Cache如何用呀?

#22


你设一下断点,在单步执行Onload事件函数的每个语句,然后在下拉框的OnSelectChanged事件函数的第一个语句设一个断点,看大部分时间花在哪个函数里面执行了。

#23


用的是什么数据库?

#1


这个选择速度慢能重复么?这个下拉框中的数据多么?

#2


可以重复,有20个部门,选择部门后将部门的人员放在;一个列表框内

#3


是不是指事件回发执行速度很慢,曾经有遇到过这个的问题.后来发现是缓存的关系,比如ViewState,太大了,页面OnLoad事件执行得很慢.你测试一下你的ViewState会不会大?

#4


怎么测试?

#5


你页面里还有别的东西么?譬如CSS里的setExpression什么的?

#6


我没有用样式表

#7


我的OnLoad事件只执行一次,这个速度不慢,就是选择下拉框的时候,下拉框的人员出来太慢了

#8


浏览器->查看->查看源文件,搜索VIEWSTATE,看看是不是非常大。像下面这个大小算是正常的:

<input type="hidden" name="__VIEWSTATE" value="dDwxMDUzMjkwODY7dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47aTwyPjtpPDc+O2k8OD47aTw5PjtpPDEwPjtpPDExPjtpPDEyPjs+O2w8dDxwPHA8bDxUZXh0Oz47bDwyMDA1LjEwLjA2Oz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDzmmJ/mnJ/lm5s7Pj47Pjs7Pjt0PEAwPHA8cD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k8MD47PjtsPHQ8QDzmrablpLflsbE7Pjs7Pjs+Pjt0PDtsPGk8MD47PjtsPHQ8QDwyMDUwOz47Oz47Pj47dDw7bDxpPDA+Oz47bDx0PEA8XGU7Pjs7Pjs+Pjt0PDtsPGk8MD47PjtsPHQ8QDxcZTs+Ozs+Oz4+O3Q8O2w8aTwwPjs+O2w8dDxAPDIxNTA7Pjs7Pjs+Pjt0PDtsPGk8MD47PjtsPHQ8QDzombnmoaU7Pjs7Pjs+Pjs+Pjt0PDtsPGk8MD47aTwxPjtpPDI+O2k8Mz47aTw0PjtpPDU+O2k8Nj47aTw3PjtpPDg+Oz47bDx0PDtsPGk8MD47PjtsPHQ8QDxNRjs+Ozs+Oz4+O3Q8O2w8aTwwPjs+O2w8dDxAPE1GODA4Mjs+Ozs+Oz4+O3Q8O2w8aTwwPjs+O2w8dDxAPEI3MzctNzAwOz47Oz47Pj47dDw7bDxpPDA+Oz47bDx0PEA85q2m5aS35bGxOz47Oz47Pj47dDw7bDxpPDA+Oz47bDx0PEA8MjMwMDs+Ozs+Oz4+O3Q8O2w8aTwwPjs+O2w8dDxAPFxlOz47Oz47Pj47dDw7bDxpPDA+Oz47bDx0PEA8XGU7Pjs7Pjs+Pjt0PDtsPGk8MD47PjtsPHQ8QDwyMzQwOz47Oz47Pj47dDw7bDxpPDA+Oz47bDx0PEA85Y6m6ZeoOz47Oz47Pj47Pj47Pj47Pj47Pj47Pj47bDxyZGlBcnI7cmRpQXJyO3JkaURlcDtyZGlDaXR5O3JkaUNpdHk7cmRpVGltZTs+PhCgvyluGKFf0x5hRyQirfHPvIef" />

#9


应该是客户端的原因,慢的可能性不会太多的,一是数据太多,二是网页需要动态计算,譬如引发脚本,特殊效果,或者CSS的setExpression等,建议把该页面在一个浏览器里单独打开,是不是还是慢,如果是,请把你的HTML码全部贴出来,包括CSS等

#10


HTML代码如下:
<%@ Page SmartNavigation="True" language="c#" Codebehind="mailzjsr.aspx.cs" AutoEventWireup="false" Inherits="goffice3._0.publics.mailzjsr" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>选择邮件接收人</title>
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body leftMargin="0" topMargin="0" MS_POSITIONING="GridLayout">
<form id="mailzjsr" method="post" runat="server">
<TABLE id="Table1" height="400" cellSpacing="0" cellPadding="0" border="0" runat="server">
<TR>
<TD style="BORDER-BOTTOM: #cfd8ea 1px solid" align="center" bgColor="#f2f6ff" colSpan="3"
height="74"><FONT face="宋体"><font color="black"><b>---- 请 选 择 人 员 ----
<asp:listbox id="ListBox1" runat="server" Visible="False" Width="38px"></asp:listbox></b></font></FONT></TD>
</TR>
<TR>
<TD style="HEIGHT: 127px" colSpan="3">
<TABLE id="Table2" style="WIDTH: 398px; HEIGHT: 128px" cellSpacing="0" cellPadding="0"
width="528" border="0" runat="server">
<TR align="center">
<TD style="BORDER-RIGHT: #ddd7bc 1px solid" width="40%" bgColor="#fffef2"><FONT face="宋体">
<table style="WIDTH: 80%; HEIGHT: 100%" cellSpacing="0" cellPadding="0" border="0">
<tr height="20%" width="100%">
<td><asp:dropdownlist id="dropdlblr" runat="server" AutoPostBack="True"></asp:dropdownlist></td>
</tr>
<tr height="80%" width="100%">
<td width="100%" height="80%"><asp:listbox id="SelBl" runat="server" Width="100%" Height="137px" SelectionMode="Multiple"></asp:listbox></td>
</tr>
</table>
</FONT>
</TD>
<TD style="WIDTH: 20%"><FONT face="宋体">
<table height="100%" cellSpacing="0" cellPadding="0" border="0">
<tr align="center">
<td><asp:imagebutton id="ButSel" runat="server" CausesValidation="False" ImageUrl="../images/img_xuanze.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr align="center">
<td><asp:imagebutton id="ButSelAll" runat="server" ImageUrl="../images/img_xuanzeall.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><asp:imagebutton id="ButDel" runat="server" ImageUrl="../images/img_del.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><asp:imagebutton id="ButDelAll" runat="server" ImageUrl="../images/img_delall.gif"></asp:imagebutton></td>
</tr>
</table>
</FONT>
</TD>
<TD style="BORDER-LEFT: #bcddc7 1px solid" width="40%" bgColor="#f6fef7"><FONT face="宋体">
<table style="WIDTH: 80%; HEIGHT: 100%" cellSpacing="0" cellPadding="0" border="0">
<tr height="20%" width="100%">
<td><asp:label id="Label2" runat="server">
<font color="red">已选择人员</font>
</asp:label></td>
</tr>
<tr height="80%" width="100%">
<td width="100%" height="80%"><asp:listbox id="SureLb" runat="server" Width="100%" Height="137px" SelectionMode="Multiple"
ForeColor="Red"></asp:listbox></td>
</tr>
</table>
</FONT>
</TD>
</TR>
<TR align="center">
<TD style="BORDER-RIGHT: #ddd7bc 1px solid" width="40%" bgColor="#fffef2"><FONT face="宋体">
<table style="WIDTH: 80%; HEIGHT: 100%" cellSpacing="0" cellPadding="0" border="0">
<tr height="20%" width="100%">
<td><asp:label id="Label1" runat="server" Width="80px" Height="6px" ForeColor="red">请选择组</asp:label></td>
</tr>
<tr height="80%" width="100%">
<td width="100%" height="80%"><asp:listbox id="listgroup" runat="server" Width="100%" Height="137px" SelectionMode="Multiple"></asp:listbox></td>
</tr>
</table>
</FONT>
</TD>
<TD style="WIDTH: 20%"><FONT face="宋体">
<table height="100%" cellSpacing="0" cellPadding="0" border="0">
<tr>
<td style="HEIGHT: 19px"><asp:imagebutton id="groupsel" runat="server" CausesValidation="False" ImageUrl="../images/img_xuanze.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><asp:imagebutton id="groupselall" runat="server" ImageUrl="../images/img_xuanzeall.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><asp:imagebutton id="groupdel" runat="server" ImageUrl="../images/img_del.gif"></asp:imagebutton></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><asp:imagebutton id="groupdelall" runat="server" ImageUrl="../images/img_delall.gif"></asp:imagebutton></td>
</tr>
</table>
</FONT>
</TD>
<TD style="BORDER-LEFT: #bcddc7 1px solid" width="40%" bgColor="#f6fef7"><FONT face="宋体">
<table style="WIDTH: 80%; HEIGHT: 100%" cellSpacing="0" cellPadding="0" border="0">
<tr height="20%" width="100%">
<td><asp:label id="Label3" runat="server" Width="87px" ForeColor="Red">已选择组</asp:label></td>
</tr>
<tr height="80%" width="100%">
<td width="100%" height="80%"><asp:listbox id="suregroup" runat="server" Width="100%" Height="137px" SelectionMode="Multiple"
ForeColor="Red"></asp:listbox></td>
</tr>
</table>
</FONT>
</TD>
</TR>
<TR>
<TD style="BORDER-TOP: #cfd8ea 1px solid" align="center" bgColor="#f2f6ff" colSpan="3"
height="64"><asp:imagebutton id="ib_queding" runat="server" ImageUrl="../images/btn_queding.gif"></asp:imagebutton>&nbsp; 
&nbsp;&nbsp; <IMG style="CURSOR: hand" onclick="butDes_onclick()" alt="" src="../images/btn_quxiao.gif"></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</form>
<SCRIPT language="VBSCript">
'确定
sub butSelect_onclick()
dim str,strr
lens=document.all("SureLb").length-1
if lens=-1 then
else
for i=0 to lens
if i=0 then
strr=strr+document.all("SureLb").options(i).value
strp=strp+document.all("SureLb").options(i).text
else
strr=strr+","+document.all("SureLb").options(i).value
strp=strp+","+document.all("SureLb").options(i).text
end if 
next
str=str+strr+"&"+strp
  end if
  window.returnValue=str
  window.close()
end sub
'取消
sub butDes_onclick()
  window.returnValue=""
  window.close()
end sub
</SCRIPT>
</body>
</HTML>

#11


警告*8808一次,请别这么做

#12


在选择下拉框中的部门和人员时,速度很慢,你是不是每次都是从数据库中读取部门和人员数据填入下拉框。正确做法是第一次用到时读数据库,并保留在内存中,第二次及以后使用时直接从内存读取。

#13


我是on_load中将部门放在下拉框中,选择下拉框时将根据下拉框的值在表中取数据后绑定列表框

#14


浏览器->查看->查看源文件,搜索VIEWSTATE,看看是不是非常大。像下面这个大小算是正常的:
<input type="hidden" name="__VIEWSTATE" value="此处省略6048字节" />
------------------------------------------------------------------------
对不起,我应该这样回复。请saucer(思归)大哥把我原来那个回复删除,谢谢。

#15


我的代码中的value是一大串字符,如同你第一次那样,说明了什么,应该如何做呢?
<input type="hidden" name="__VIEWSTATE" value="一大串字符" />

#16


我是on_load中将部门放在下拉框中,选择下拉框时将根据下拉框的值在表中取数据后绑定列表框
------------------------------------------------------------------------------------
如果人员表的数据不是太多的话,比如在几千人到几万人之间,建议事先把数据库中人员表的“部门ID、姓名、E-Mail地址”等列读入一个静态的DataTable字段或Session中,然后人员列表框绑定DataView,再根据所选部门设置DataView的RowFilter属性为: "部门ID="+所选部门

#17


除非你的记录有很多,导致IE解释HTML时很慢.
你获取雇员的时候是不是通过视图,如果是用查询分析器看下视图执行结果.
最好把大概的代码贴出来.

#18


建议用Cache,可以让多人使用共享数据,提高速度!

#19


mycls.Fill("select nodeid,mc from 人员表 where parentid ='下拉框的植' order by order_id");
this.SelBl.DataSource =mycls.ds.Tables[0].DefaultView;

this.SelBl.DataBind();
mycls.Close();

#20


上面是选择下拉框后执行的代码

#21


Cache如何用呀?

#22


你设一下断点,在单步执行Onload事件函数的每个语句,然后在下拉框的OnSelectChanged事件函数的第一个语句设一个断点,看大部分时间花在哪个函数里面执行了。

#23


用的是什么数据库?