Prevent Access to Partial View from URL but not from Ajax Call
<p>I wrote few partial methods in my controller and it is accessing directly typing in url. I want to restrict those particular methods.I used [ChildActionOnly] Attribute to restrict it. It works fine, but I am using Ajax Call to access those methods. The Ajax call is not working in ChildActionOnly. Is there any Attribute which will block from url and allows Ajax calls?
Thanks.</p>