摘要: Page_preInit (常用)Page_Init (常用) 主要完成页面初始化时运行(只运行一次)Page_InitCompletePage_PreLoadpage_Load (常用) 页面读放内存时运行,每次都会初触发page_LoadCompleteButton_Clickpage_PreRender(常用)Page_PreRenderCompletePage_SaveStateComplete protected void Page_PreInit(object sender, EventArgs e) { Response.Write("我执行了Page_PreInit& 阅读全文
posted @ 2012-05-10 11:19 一篮饭特稀 阅读(259) 评论(1) 推荐(0) 编辑
摘要: 单个文件的上传:保存到上传服务器指定目录: FileUpload1.Save(Server.MapPath("/upfiles/upload/") +FileUpload1.FileName);得到上传文件的文件名(含上传本地路径):FileUpload1.PostedFile.FileName;得到上传文件的大小:FileUpload1.PostedFile.ContentLength;得到上传文件上传类型:FileUpload1.PostedFile.ContentType;得到上传文件扩展名:System.IO.Path.GetExtension(FileUpload 阅读全文
posted @ 2012-05-10 11:18 一篮饭特稀 阅读(2042) 评论(0) 推荐(2) 编辑
摘要: FCKeditor是一款功能强大的开源在线文本编辑器(DHTML editor),使你在web上可以使用类似微软Word 的桌面文本编辑器的许多强大功能。FCKeditor目前的最新版本是2.6.3,本文以FCKeditor2.6.3介绍在asp.Net中的配置方法。FCKEditor官方下载地址:http://www.fckeditor.net/download在官方网站下载FCKeditor 2.6.3: FCKeditor_2.6.3.zipFCKeditor.Net :FCKeditor.Net_2.6.3.zip配置方法如下:一、删除不必要的文件从官方下载下来的FCKEditor2. 阅读全文
posted @ 2012-05-10 11:17 一篮饭特稀 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1 <asp:Repeater ID="DataListTolData" runat="server"> 2 <HeaderTemplate> 3 <table name="mitab" border="1" align="center" style="border-collapse:collapse;width:98%;word-break: break-all;"> 4 <tr class="Toptr_bg" 阅读全文
posted @ 2012-05-10 11:16 一篮饭特稀 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 读取View Code 1 ConfigurationManager.AppSettings["isMail"]修改View Code 1 public static void SetValue(string path, string KeyName, string AppValue) 2 { 3 XmlDocument xDoc = new XmlDocument(); 4 xDoc.Load(path); 5 XmlNode xNode; 6 XmlElement xElem1; 7 xNode = xDoc.SelectSingleN... 阅读全文
posted @ 2012-05-10 11:12 一篮饭特稀 阅读(108) 评论(0) 推荐(0) 编辑
摘要: <meta http-equiv="pragma" content="no-cache" /><meta http-equiv="cache-control" content="no-cache" /><meta http-equiv="expires" content="0" /> 阅读全文
posted @ 2012-05-10 11:08 一篮饭特稀 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 调用:View Code 1 int width = 190;2 int height = 190;3 Bitmap source = new Bitmap("c:\\someimage.jpg");4 System.Drawing.Image thumb = source.GetThumbnailImage(width,height,null,IntPtr.Zero);5 thumb.Save("C:\\someimageshot.jpg");6 thumb.Dispose();函数:View Code 1 public static Bitmap C 阅读全文
posted @ 2012-05-10 11:05 一篮饭特稀 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 第一:private void Button1_Click(object sender, System.EventArgs e){ Response.Redirect(Request.Url.ToString())}第二:private void Button2_Click(object sender, System.EventArgs e){ Response.Write(" < script language=javascript>window.location.href=document.URL; < /script>")}第三:private 阅读全文
posted @ 2012-05-10 11:03 一篮饭特稀 阅读(150) 评论(0) 推荐(0) 编辑
摘要: //本地路径转换成URL相对路径View Code 1 private string urlconvertor(string imagesurl1)2 {3 string tmpRootDir = Server.MapPath(System.Web.HttpContext.Current.Request.ApplicationPath.ToString());//获取程序根目录4 string imagesurl2 = imagesurl1.Replace(tmpRootDir, “”); //转换成相对路径5 imagesurl2 = imagesurl2.Replace(@”\“, @”/ 阅读全文
posted @ 2012-05-10 10:58 一篮饭特稀 阅读(1510) 评论(0) 推荐(0) 编辑
摘要: [一篮饭特稀原创,转载请注明出处http://www.cnblogs.com/wanghafan/archive/2012/05/10/2493864.html]js脚本正则判空和数字验证View Code 1 <script type="text/javascript"> 2 function CheckNullAndType() 3 { 4 var ErrorStr=''; 5 if($('#tb_FContractName').val().replace(/(^\s*)|(\s*$)/g, "")==&# 阅读全文
posted @ 2012-05-10 10:22 一篮饭特稀 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 1.Web发布到IIS为网站假设端口为20000。2.配置HIMI类型: .xaml application/xmal+xml .xap application/x-silverlight-app3.用WinRAR解压Web\ClientBin\Strongsoft.FloodControl.Module.Contact.xap文件到磁盘上4.修改Strongsoft.FloodControl.Module.Contact\ServiceReferences.ClientConfig里面的<endpoint address节点"http://localhost:20000/Se 阅读全文
posted @ 2012-05-10 10:10 一篮饭特稀 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 前提:ContactInfo对象有ID属性且有值 //DataGrid选中改变 private void dgContact_SelectionChanged(object sender, SelectionChangedEventArgs e) { MessageBox.Show(((ContactInfo)((DataGrid)sender).SelectedItem).ID.ToString()); } 阅读全文
posted @ 2012-05-10 10:10 一篮饭特稀 阅读(269) 评论(0) 推荐(0) 编辑
摘要: System.Windows.Browser.HtmlDocument doc = System.Windows.Browser.HtmlPage.Document;if (doc.QueryString.Count > 0){ STNM = doc.QueryString["STNM"].ToString();} 阅读全文
posted @ 2012-05-10 10:09 一篮饭特稀 阅读(91) 评论(0) 推荐(0) 编辑
摘要: [一篮饭特稀原创,转载请注明出处http://www.cnblogs.com/wanghafan/archive/2012/05/10/2493808.html]在SL和WPF中定义依赖项属性来设定属性系统中要实现设置IsTree为true,显示树状列表,否则显示下拉列表功能App.xaml.cs代码:View Code 1 private void Application_Startup(object sender, StartupEventArgs e)2 {3 //this.RootVisual = new MainPage();4 ... 阅读全文
posted @ 2012-05-10 10:01 一篮饭特稀 阅读(247) 评论(0) 推荐(0) 编辑
摘要: [一篮饭特稀原创,转载请注明出处http://www.cnblogs.com/wanghafan/archive/2012/05/10/2493799.html]银光中ComboBox+TreeView构成自定义控件:思路1:textbox+button+treeview 缺点:不能跨ChildWindow、零散 [实现]思路2:ComboBox+TreeView+textbox 优点:可以跨ChildWindow [实现]+[推荐]思路3:ComboBox+TreeView 优点:可以跨ChildWindow、紧凑 [未实现]给出思路2的核心代码:xaml:View Code 1 <C 阅读全文
posted @ 2012-05-10 09:56 一篮饭特稀 阅读(1220) 评论(0) 推荐(0) 编辑