Hey Karthik,
Quick question. The click that you are performing when the folder has subfolders is in the left hand side tree view or on the right hand visual web part ?
The reason for the question is that the event handling needs to be done on the appropriate control for the purpose.
Is the operation happening correctly on a new browser tab ? If so, are you using JavaScript Object Notation code to achieve this or is it plain Javscript over XML. We need to review this piece of code.
We need to know which event has been overridden to achieve the tab detail display. How have you originally achieved the display of the folder information functionality? Have you used the !Page.IsPostBack method etc.
I differ from Sohel's remark because he is referring to the out of Box tree view control that SharePoint 2013 provides on the Look and Feel section without any publishing feature being enabled, and the out of box tree view event handler
customization would not be a supported method . You have used a customized ASP NET Tree view control on the other hand.
But Fundamentally, we can intercept ongoing page events using javascript
<script src="/SharedDocument/jquery-1.7.1.min" type="text/javascript"></script>
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push('your_function_name_here');
function your_function_name_here() {
<//Server code to display the folder items here
}
Do let me know if you have any questions
Regards
Ram