protected void Page_Load(object sender, EventArgs e) { Basic.Service svc = new Service(); Basic.ServiceWse ws = new ServiceWse(); ws.SetPolicy("509Policy"); Label1.Text = svc.HelloWorld(); }
protected void ObjectDataSource1_ObjectCreated(object sender, ObjectDataSourceEventArgs e) { // get a reference to the object, in this case the proxy, from the object data source after // it has instantiated it ServiceWse proxy = (ServiceWse)e.ObjectInstance; proxy.SetPolicy("LibraryClientPolicy"); }