摘要:
读取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... 阅读全文
摘要:
<meta http-equiv="pragma" content="no-cache" /><meta http-equiv="cache-control" content="no-cache" /><meta http-equiv="expires" content="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 阅读全文
摘要:
第一: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 阅读全文
摘要:
//本地路径转换成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(@”\“, @”/ 阅读全文
摘要:
[一篮饭特稀原创,转载请注明出处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, "")== 阅读全文
摘要:
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 阅读全文
摘要:
前提:ContactInfo对象有ID属性且有值 //DataGrid选中改变 private void dgContact_SelectionChanged(object sender, SelectionChangedEventArgs e) { MessageBox.Show(((ContactInfo)((DataGrid)sender).SelectedItem).ID.ToString()); } 阅读全文
摘要:
System.Windows.Browser.HtmlDocument doc = System.Windows.Browser.HtmlPage.Document;if (doc.QueryString.Count > 0){ STNM = doc.QueryString["STNM"].ToString();} 阅读全文
摘要:
[一篮饭特稀原创,转载请注明出处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 ... 阅读全文