We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to pass id from the client to the controller of the PDF viewer control?

You can pass ID from the client to the server using the serviceUrl property of the PDF viewer control. To achieve this, interchange the ID and the action string in the routeTemplate property of Register(HttpConfiguration config) in WebApiConfig.cs. Refer to the following code snippet. 

 

Then, pass the ID from the view page to the web API controller. Refer to the following code snippet.

 

Note: String value can also be passed to the Web API controller. 

In the Web API controller, add an overload in the web action methods as follows.

 Note: If you are passing the value as a string, the datatype of ID must be a string. 

 

 

Sample link:

http://www.syncfusion.com/downloads/support/directtrac/general/ze/PDFViewer-1549172864

Article ID: Published Date: Last Revised Date: Platform: Control:
8751 05/15/2018 05/15/2018 ASP.NET MVC PdfViewer
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.