Free Support Forum - groupdocs.com

How to set up a viewer in code behind asp.net


#1

Hello,

I’m new in groupdocs viewer ,I see groupdocs programmer guides and set up a new test program,
but I need to set up viewer in code behind ,because I read the file names from data base and file name change with user action.
I use this code in my c# code behind page instead using in source :
Viewer.ClientCode().TargetElementSelector("#div2").FilePath(“1001115_eng.ppt”).DocViewerId(“doc_viewer2”).EnableRightClickMenu(false)
.ShowThumbnails(true).OpenThumbnails(true).ZoomToFitWidth().ZoomToFitHeight();


but It doesn’t work for me,please help me to solve this problem

#2

Hi Mina,

Thanks for sharing your project with us in an email.

We have fixed up your project please try this out locally and let me know how you get on:

Here is fixed project for .NET Viewer:

https://drive.google.com/file/d/0Bw7FRVMOzHsUeFhHZ3R2NDdtVDQ/edit?usp=sharing

It looks like you didn't add the reference to the Viewer DLL. We added the ref, and compiled the project with copying the libs to the bin (local option). So the project should start now and work without updates.

Please let me know if you have any other issues and we'll be glad to help?

Take care,

Derek

Derek Hyland, Venture Lead, GroupDocs (Aspose Pty Ltd)

Office: +1 (214) 329 9760

Skype: derekh.aspose