Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Calling from javascript to WCF
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.ServiceModel;
- using System.Text;
- namespace ISTL
- {
- public class MatchesListService : IMatchesListService
- {
- public bool AcceptRequestToChangeMatchTime(int matchId)
- {
- return MatchesListManager.AcceptRequestToChangeMatchTime(matchId);
- }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Runtime.Serialization;
- using System.ServiceModel;
- using System.Text;
- namespace ISTL
- {
- [ServiceContract(Namespace = "ISTL")]
- public interface IMatchesListService
- {
- [OperationContract]
- bool AcceptRequestToChangeMatchTime(int matchId);
- }
- }
- <system.serviceModel>
- <services>
- <service name="ISTL.MatchesListService">
- <endpoint binding="webHttpBinding" contract="ISTL.IMatchesListService"></endpoint>
- </service>
- </services>
- <behaviors>
- <endpointBehaviors>
- <behavior>
- <enableWebScript />
- </behavior>
- </endpointBehaviors>
- </behaviors>
- </system.serviceModel>
- <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
- <Services>
- <asp:ServiceReference Path="~/MatchesListService.svc" />
- </Services>
- </asp:ScriptManager>
- ISTL.IMatchesListService.AcceptRequestToChangeMatchTime(matchId);
Add Comment
Please, Sign In to add comment