asp.net mvc 4 - preventing refresh when clicking on the current page -
i'm new asp.net mvc4.
i'm implementing navigation bar in website.
i'd prevent refresh when clicking current page in nav bar.
update i'm using razor navigation bar:
<ul> @html.actionlink("feature_1_url","feature_1_url","home") @html.actionlink("feature_2_url","feature_2_url","home") @html.actionlink("feature_4_url","feature_4_url","home") </ul>
how can accomplish it?
in given solutions page refreshed reduce server call , not call action again , again.
in mvc4 1 of best way can achieve purpose using caching
[outputcache(duration=30)] public actionresult feature_1_url(){}
so specifying time store result in caching when click next time actionlink give result caching data per duration time , reduce request server.
this can useful @ least fast response
Comments
Post a Comment