摘要:
var reCat = /cat/gi; //正则表达式规则(/cat/gi:g表示查找所有字符,i表示不区分大小写) reCat.test("This is a Cat!");//false 进行字符串匹配 var str = "a cat, a fat";reCat.exec(str) //等同于str.match(reCat); 返回匹配字符串数组 str.search(reCat);//返回第一次在字符串中出现的位置,从0开始。str.replace(reCat,"ta");//替换所有匹配的字符。var reDate =/( 阅读全文
摘要:
// 在此处放置用户代码以初始化页面 Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application(); Type wordType = word.GetType(); Microsoft.Office.Interop.Word.Documents docs = word.Documents; // 打开文件 Type docsType = docs.GetType(); obje... 阅读全文
摘要:
Ajax请求的WebService方法:[WebService(Namespace = "http://tempuri.org/")][WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. [System.Web.Script.Services.ScriptService]public class Pa 阅读全文
摘要:
问题:类型“CheckBox”的控件“ctl01”必须放在具有 runat=server 的窗体标记内。解决方法:1. 把CheckBox控件放到 from内。2. 覆盖Page的VerifyRenderingInServerForm方法 public override void VerifyRenderingInServerForm(Control control) { //base.VerifyRenderingInServerForm(control); } 阅读全文
摘要:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableHistory="True" EnableSecureHistoryState="False"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Wizard ID 阅读全文