1,前端开发框架对比 王 芳侠,
http://www.ibm.com/developerworks/cn/web/1404_wangfx_jsframeworks/
2,
linq.where() 都得存储一下;
错误:
var data = source.VW_LoanDetail.AsQueryable();
if (!string.IsNullOrEmpty(txt资金性质.Text.Trim()))
{
data.Where(l => l.资金性质.Contains(txt资金性质.Text.Trim()));
}
正确:
var data = source.VW_LoanDetail.AsQueryable();
if (!string.IsNullOrEmpty(txt资金性质.Text.Trim()))
{
data = data.Where(l => l.资金性质.Contains(txt资金性质.Text.Trim()));
}
3,问题:多个view中无法使用jquery为某个控件绑定事件?
原因:updatepanel中第二个view中的控件没有渲染,导致绑定事件失败;所以只能使用【<asp:TextBox ID ="LI_txt借款数额" runat="server" onfocus='if(this.value=="0.00"){this.value="";};' onblur='if(this.value==""){this.value="0.00"}' ></asp:TextBox>】手动触发事件。
Note:在客户端生成的ID为 asp:content的id+“_”+控件ID
Note:jquery.js已经在模板页引入;
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
$(function(){
$('#ContentPlaceHolder1_LI_tx').focus(function(){$(this).val("")}); //在客户端生成的ID为 asp:content+“_”+控件ID
});
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat ="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpadtePanel1" runat="server">
<ContentTemplate>
<asp:MultiView ID="mvMain" runat="server">
<asp:View ID="vwLoanInfo" runat="server">
<tr>
<tr>
<asp:View ID="vwLoanInfo1" runat="server">
<tr>
<td>借款数额</td>
<td> <asp:TextBox ID ="LI_txt借款数额" runat="server" onfocus='if(this.value=="0.00"){this.value="";};' onblur='if(this.value==""){this.value="0.00"}' ></asp:TextBox>
<asp:TextBox ID ="LI_txt" runat="server" ></asp:TextBox> //-------此处
</td>
</tr>