Refresh Button on a view

Refresh Button on a view

I want to create a refresh button on a view, but cannot use the reload action on a user defined function. What is the best way to create the refresh button on the view?