上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要: 1.如果让本页转向新的页面则用: <input type=button onclick="window.location.href('连接')"> 2.如果需要打开一个新的页面进行转向,则用: <input type=button onclick="window.open('连接')"> 阅读全文
posted @ 2012-05-02 10:07 Bug山Bug海 阅读(166) 评论(0) 推荐(0)
摘要: Silverlight4在跨域访问TCP时会读取Http 80端口的跨域策略文件,可以放IIS上,也可以在服务控制台托管Http服务例子是控制台托管TCP服务和Http跨域策略文件服务配置文件:<?xml version="1.0"?><configuration> <system.serviceModel> <services> <service name="ConsoleApplication1.DuxpexService"> <endpoint address="" 阅读全文
posted @ 2012-05-01 00:27 Bug山Bug海 阅读(306) 评论(0) 推荐(0)
摘要: 跨域服务:特性WebGet在System.ServiceModel.Web中View Code [ServiceContract] public interface IDomainService { [OperationContract] [WebGet(UriTemplate = "ClientAccessPolicy.xml")] Message ProvidePolicyFile(); } public class DomainService:IDomainService { #region I... 阅读全文
posted @ 2012-04-30 16:46 Bug山Bug海 阅读(647) 评论(0) 推荐(0)
摘要: 服务端类代码服务契约: [ServiceContract(CallbackContract=typeof(IserviceCallBack))] public interface IService1 { [OperationContract] string GetData(int value); } public interface IserviceCallBack { [OperationContract] string GetClientData(); }服务实例: [ServiceBeh... 阅读全文
posted @ 2012-04-30 00:36 Bug山Bug海 阅读(158) 评论(0) 推荐(0)
摘要: View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.ServiceModel.Channels;using System.ServiceModel.Description;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { ... 阅读全文
posted @ 2012-04-29 23:55 Bug山Bug海 阅读(308) 评论(0) 推荐(0)
摘要: 此方法一般用于Web,部署环境经常变化导致IP经常变动例子是Silveright调用同域WCF服务的方法 WordGameServiceClient GetClient() { BasicHttpBinding basicbind = new BasicHttpBinding(BasicHttpSecurityMode.None); BinaryMessageEncodingBindingElement binE = new BinaryMessageEncodingBindingElement(); ... 阅读全文
posted @ 2012-04-29 13:13 Bug山Bug海 阅读(206) 评论(0) 推荐(0)
摘要: 转自 http://www.cnblogs.com/nokiaguy/archive/2009/02/05/1384860.htm 先看下面一个嵌套的查询语句:select*from person.StateProvincewhere CountryRegionCodein (select CountryRegionCodefrom person.CountryRegionwhere Name like'C%') 上面的查询语句使用了一个子查询。虽然这条SQL语句并不复杂,但如果嵌套的层次过多,会使SQL语句非常难以阅读和维护。因此,也可以使用表变量的方式来解决这个问题,SQL 阅读全文
posted @ 2012-04-28 17:59 Bug山Bug海 阅读(225) 评论(0) 推荐(0)
摘要: 1.事件通常写法(C# 1.0)this.button.Click +=new EventHandler(button_Click); void button_Click(object sender, EventArgs e) { throw new NotImplementedException(); } 在C#2.0中使用匿名方法this.button.Click +=delegate{throw new NotImplementedException(); }; //或者 this.button.Click +=delegate(object obj, EventArgs ar... 阅读全文
posted @ 2012-04-25 10:35 Bug山Bug海 阅读(172) 评论(0) 推荐(0)
摘要: 到 C:\Program Files (or x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp (or Visual Basic)\Web\MVC (or 2) 3\CodeTemplates复制CodeTemplates目录下文件到项目,删除tt类文件的Custom Tool属性,然后对项目中模板的修改会覆盖全局设置C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC 3\CodeTempl 阅读全文
posted @ 2012-04-16 13:00 Bug山Bug海 阅读(354) 评论(0) 推荐(0)
摘要: 属性路径语法 Propertyhttp://msdn.microsoft.com/zh-cn/library/cc645024(v=vs.95).aspx#databinding_sa 阅读全文
posted @ 2012-04-10 21:34 Bug山Bug海 阅读(99) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 下一页