I have a Sharepoint 2007 document library. There is a custom action associated with a document menu (when you click on the drop down list of a given document). When the user clicks that menu, some custom code gets executed. However, after the custom code executes, the page reloads and shows the document library in its default view. I want the users to be able to define their own views and then when the custom code executes, I want the view to stay exactly the same instead of reverting back to the Default View.
I'm guessing that at the beginning of the custom code I need to somehow retrieve the current view filter and then after the code executes I need to set the lists' view to be that view again. I've found the code for retrieving the list view filter by GUID (list.GetView(GUID) but I want to be able to retrieve the current view. Or is there some other way to specify for the view to stay the same? The view stays the same when the Sharepoint native code executes and refreshes the page so this problem only occurs with the custom code.
thanks,