ajax 更新 Datalist 的问题
本人做个搜索,首次登陆只有搜索表单,点击按钮局部刷新出现一个Datalist 显示搜索结果。想用MS 的ajax 实现,弄了一上午,发现不对劲,请高手指点指点啊,小弟不胜感激。
前台部分:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div id="news_text" style="text-align:center; height:300px;">
<table cellpadding="0" cellspacing="0" style="border-top-style: none; border-bottom: #FF8200 1px solid;border-left: #FF8200 1px solid;border-right: #FF8200 1px solid; width: 952px; height: 300px;" >
<tr>
<td height="419" valign="top" style="width: 714px; height: 300px; border-right: #FF8200 1px dotted;">
<div id="text_content" style="font-size: 12px; color: dimgray" >
<br />
<div id="search_style" align="center" >
<table border="0" cellpadding="0" cellspacing="0" style="border-top: #99cc33 1px solid; border-left: #99cc33 1px solid; border-bottom-width: 1px; border-bottom-color: #99cc33; border-right-width: 1px; border-right-color: #99cc33;">
<tr>
<td colspan="3" style="border-bottom: #99cc33 1px solid;background-color:#C5FDB7; border-right: #99cc33 1px solid; border-left-width: 1px; border-left-color: #99cc33; height: 33px;">
高级搜索</td>
</tr>
<tr>
<td style="width: 118px; background-color: border-top-width: 1px; border-right: #99cc33 1px solid; border-left-width: 1px; border-left-color: #99cc33; border-top-color: #99cc33; border-bottom: #99cc33 1px solid; height: 35px;" align="right">
主题词: </td>
<td colspan="2" style="width: 437px; border-right: #99cc33 1px solid; border-bottom: #99cc33 1px solid; height: 35px;" align="left">
<input id="Text1" style="width: 415px" type="text" /></td>
</tr>
<tr>
<td style="width: 118px; border-right: #99cc33 1px solid; border-bottom: #99cc33 1px solid;" align="right">
搜索分类: </td>
<td colspan="2" style="width: 437px; height: 35px; border-right: #99cc33 1px solid; border-bottom: #99cc33 1px solid;" align="center">
按标题:<input id="Radio1" name="radio1" checked type="radio" />
按内容: <input id="Radio2" name="radio1" type="radio" /></td>
</tr>
<tr >
<td style="width: 118px; border-right: #99cc33 1px solid; border-bottom: #99cc33 1px solid;" align="right"> 按时间: </td>
<td colspan="2" style="height: 35px; width: 437px; border-right: #99cc33 1px solid; border-bottom: #99cc33 1px solid;" align="center" valign="middle">
从:<asp:TextBox runat="server" id="Text2" style="width: 107px" type="text" />
<asp:ImageButton runat="Server" ID="Image1" ImageUrl="images/Calendar_scheduleHS.png" AlternateText="Click to show calendar" />
<cc1:CalendarExtender ID="CalendarExtender" runat="server" CssClass="ajax__calendar" Format="yyyy-MM-dd" TargetControlID="Text2" PopupButtonID="Image1" />
到:<asp:TextBox id="Text3" runat="server" style="width: 107px" type="text" /></asp:TextBox>
<asp:ImageButton runat="Server" ID="ImageButton1" ImageUrl="images/Calendar_scheduleHS.png" AlternateText="Click to show calendar" />
<%-- <cc1:CalendarExtender ID="CalendarExtender" runat="server" />
--%>
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" CssClass="ajax__calendar" Format="yyyy-MM-dd" TargetControlID="Text3" PopupButtonID="ImageButton1" /></td>
</tr>
<tr >
<td style="width: 118px; border-right: #99cc33 1px solid; border-bottom: #99cc33 1px solid;" align="right"> 按系统资源分类: </td>
<td colspan="2" style="height: 34px; width: 437px; border-right: #99cc33 1px solid; border-bottom: #99cc33 1px solid;" align="center" >
<asp:DropDownList ID="DropDownList1" runat="server" Width="288" style="color:#999999">
<asp:ListItem>
---- 选择系统资源分类 ----
</asp:ListItem>
</asp:DropDownList> </td>
</tr>
<tr>
<td rowspan="2" style="width: 118px; height: 34px; border-right: #99cc33 1px solid; border-bottom: #99cc33 1px solid;" align="right"> </td>
<td colspan="2" style="height: 34px; width: 437px; border-right: #99cc33 1px solid; border-bottom: #99cc33 1px solid;" align="center">
精确:<input id="Radio5" name="radio2" checked type="radio" /> 模糊:<input id="Radio6" name="radio2" type="radio" />(速度较慢)</td>
</tr>
<tr>
<td colspan="2" style="height: 37px; width: 437px; border-right: #99cc33 1px solid; border-bottom: #99cc33 1px solid;" align="center">
<Button id="Submit1" class="button" type="button" onMousemove="this.className='button_on'" onMouseout="this.className='button'" onclick="return CallServer(Label1)" TabIndex="8" >开始搜索</Button></td>
</tr>
</table>
</div>
<div id="Label1" style="border-right: darkturquoise 1px solid;border-top: darkturquoise 1px solid; border-left: darkturquoise 1px solid; width: 230px;filter:alpha(opacity=60); position:absolute; z-index:2; border-bottom: darkturquoise 1px solid; height: 26px; background-color: paleturquoise; display:none; left: 320px; top: 470px">
</div>
<div id="about" style="text-align:center;">
<asp:UpdatePanel UpdateMode="Conditional" ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DataList ID="result_list" runat="server" ShowFooter="false" ShowHeader="false" >
<ItemTemplate>
<%#Eval("New_Title").ToString() %>
</ItemTemplate>
</asp:DataList>
</ContentTemplate>
<Triggers >
<asp:AsyncPostBackTrigger ControlID="result_list" />
</Triggers>
</asp:UpdatePanel>
......