摘要:JS刷新框架外页面七种实现代码: 1. window.parent.frames[1].location.reload(); 2. window.parent.frames.bottom.location.reload(); 3. window.parent.frames["bottom"].loc
阅读全文
摘要:程序中,有时会遇到超时的异常,需要进行处理,用一般的try...catch(Exception ex)...会发现ex没有status属性,此时使用WebException捕获异常:
阅读全文
摘要:导入导出功能,在调用ShowDialog时的错误,解决办法如下: WinForm窗体的入口点: /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] private static void Main(String[] args) { Appl
阅读全文
摘要:前台页面: <form id="form1" runat="server"> <select runat="server" id="TestList"> </select> </form> 后台代码: public readonly string conStr = ConfigurationMana
阅读全文
摘要:1. 模糊查询时,注意要去掉空格前台: 后台: protected void btnSearch_Click(object sender, EventArgs e) { if (txtQJMC.Value != string.Empty) { where += " and applianceName like '%" + txtQJMC.Value.Trim() + "%'"; //此处注意去掉空格,否则查不到数据 } Bind(); ...
阅读全文
摘要:前途页面: <asp:Repeater ID="rptList" runat="server" OnPreRender="rptList_PreRender"> <ItemTemplate> <tr> <td align="center" runat="server" id="Num"> <%#Ev
阅读全文
摘要:1. 基础数据绑定:直接用ListItem枚举,如: <asp:DropDownList ID="DDL_1" runat="server"> <asp:ListItem Value="1">1</asp:ListItem> <asp:ListItem Value="2">2</asp:ListIt
阅读全文
摘要:<webdiyer:AspNetPager ID="AspNetPager1" runat="server" HorizontalAlign="Center" OnPageChanged="AspNetPager1_PageChanged" Width="100%" FirstPageText="首
阅读全文