c# - How to pass values through a WCF Service in a ASP.NET Website -
c# - How to pass values through a WCF Service in a ASP.NET Website -
i working on outlook addin our website. want pass selected date, time , subject outlook calender our website loads in webcontrol within outlook. webservice wcf.
i can transfer calender values wcf this:
[operationcontract] string getbookingurl(string guid, bookingrequest request,string token,string exiturl);
bookingrequest class pass calender values:
[servicecontract] public class bookingrequest { public long bookingid { get; set; } public datetime startutc { get; set; } public datetime endutc { get; set; } public string subject { get; set; } public int numparticipants { get; set; } }
now next step on asp.net website:
protected sub page_load(byval sender object, byval e system.eventargs) handles me.load if (bookingrequest!=null) fromdatetextfield.text = bookingrequest.startutc todatetextfileld.text = bookingrequest.endutc subjecttextfield.text = bookingrequest.subject end if end sub
the problem don't know how pass values wcf webpage on load.
maybe there solution without wcf. help me solve problem?
i assuming have created proxy class on client side. using object can phone call service using proxy object. bellow:
proxyservclient client = new proxyservclient(); bookingrequest bookingrequest = client.getbookingdetails(); if(bookingrequest!=null) { fromdatetextfield.text = bookingrequest.startutc; todatetextfileld.text = bookingrequest.endutc; subjecttextfield.text = bookingrequest.subject; }
for have create booking request property class has properties service going return.
c# asp.net vb.net wcf outlook-addin
Comments
Post a Comment