I created a web part app for sharepoint online. I wanted to know if it is possible to get the instance id of the web part, using csom on server side. For example, if I put the web part within a page, twice, I would like to know the two GUID generated for those two. I checked this ticket How to get current web part GUID, but I am not sure how I can access the method RenderContents. The app is a provider-hosted app (azure), it was build using Visual Studio 2015 and it is an MVC project.

1 Answer 1


If you are using two listview webpart on same page then in SharePoint there is on class which is common in all listview "ms-listviewtable".

Use below code and iterate using each loop in jQuery.


You will get HTML inside it and find unique GUID for both web part.

  • Sorry I didnt mention I need to get the value from server side using csom. Is it possible?.
    – Flezcano
    Feb 10, 2017 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.