I am trying to create a textbox that when the user clicks on the up or down arrow a minute will be added or subtracted to/from the time. I created a web service thinking I could pass the current time to methods that add and subtract one minute from the current time. But I am unsure of how to pass a DateTime variable or if I even can.
Here is my webservice:and my control:Code:[System.Web.Script.Services.ScriptService()] public class NumericUpDownService : System.Web.Services.WebService { [WebMethod] public DateTime NextTime(DateTime currentTime) { currentTime = currentTime.AddMinutes(1); return currentTime; } [WebMethod] public DateTime PerviousTime(DateTime currentTime) { currentTime = currentTime.AddMinutes(-1); return currentTime; } }ServiceDownPath="NumericUpDownService.asmx"Code:<cc1:NumericUpDownExtender ID="TimeNumericUpDownExtender" runat="server" TargetControlID="TimeTextBox" Width="70" RefValues="" ServiceUpPath="NumericUpDownService.asmx"
ServiceUpMethod="NextTime"
ServiceDownMethod="PerviousTime" >
</cc1:NumericUpDownExtender>
How do I pass and get back a datetime object to/from my methods NextTime and PeriousTime? Thanks for any help!


Reply With Quote




Bookmarks