views:

17

answers:

1

I have a PartialView, on a form that does an ajax post. All my controller's inherit from a base controller that has a property on it "ReferringPartialView".

I need to somehow set that property and allow a user to make use of it in the post action.

I figure i need to override "OnActionExecuting", so i have done so, but no where can i find out which "PartialView" actually made the post.

I had a look at the ActionExecutingContext, but that either gives me the referring URL, or the current action, but not the referring PartialView.

I hope this makes sense :)

A: 

There is no info in the request that allows you to determine which partial view made the request.

You'll need to establish some convention to achieve what you want. A hidden field, a variation of the url, a query string value, in other words something custom you add to the form post.

eglasius