Increasing the ViewsCout by HttpHandler
Hello,
I need to increment the viewcount from a download list and document list when clicking the link...
I'm aware viewcount will not be handled till Q2 (I've read on PIT that it's scheduled for Q2), I've tried successfully in a mine custom control to increment the viewcount and it works (using)
App.WorkWith().Document(guid).Do(doc =>
doc.ViewsCount++;
).SaveChanges();
The WebResource.axd handler must be registered in the configuration to process this request.
<!-- Web.Config Configuration File -->
<
configuration
>
<
system.web
>
<
httpHandlers
>
<
add
path
=
"WebResource.axd"
verb
=
"GET"
type
=
"System.Web.Handlers.AssemblyResourceLoader"
validate
=
"True"
/>
</
httpHandlers
>
</
system.web
>
</
configuration
>
Hello Paolo,
You have to override Telerik.Sitefinity.Modules.Libraries.Web.UI.Documents.MasterListView where we populate the control with data. There is a virtual method DataBindDocumentList where we bind the repeater - "documentsRepeater"
Then you should replace the default MasterListView of the DownloadList with your custom view.
Kind regards,
Ivan Dimitrov
the Telerik team