asmx with jquery

ITsolutionWizard
ITsolutionWizard used Ask the Experts™
on
I have asmx and I hope to have html / jquery to consume it.
The asmx below using class library as parameter.

I do not know how to consume it on html/jquery. Can you show me how to do that?

Thanks,


[WebMethod]
        public string CreateDisciplinaryComplaintInPDF(Domain.DisciplinaryComplaint dd)
        {
            Controller.PDFservice ps = new Controller.PDFservice();
            Domain.DisciplinaryComplaint ddNew = new Domain.DisciplinaryComplaint();
            #region data mapping
            ddNew.fullName = dd.fullName;            
            #endregion
            string returnString =  ps.GetDisciplinaryComplaintDownloadData(dd);
            return returnString;
        }

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fractional CTO
Distinguished Expert 2018
Commented:
Keep in mind ASMX has been deprecated by WCF.

Be sure to check your data producer + verify ASMX is actually still in use.

Also verify if there's a date when ASMX will be retired.

If there is a retirement date, best to write all your code using WCF docs.

Author

Commented:
We have to use ASMX. It is from one of our very old application. We won't be able to switch to WCF.

However, if you can show me how to do it with WCF, I will take a look. Thanks
leakim971Multitechnician
Top Expert 2014

Commented:
what do you mean by "consume"?
usually we want to know what to put in the asmx instead trying to force client side to "consume" something

it look like you're trying to display a pdf in a page using javascript
you should create an iframe (or a popup) and just call your asmx page, you don't need jQuery for that purpose
Zakaria AcharkiAnalyst Developer
Distinguished Expert 2018

Commented:
Take a look at :

BLIND LINK REMOVED

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial