Does anyone know, if a partial view (PartialViewResult
) in an ascx file - knows if it is running stand alone - called directly from the browser or as part of a page.
I would like to treat these cases differently.
Edit:
Case 1: In the page case it could be that a page has a few partials that are loaded using ajax while the page is being built. The partials might be called again using ajax according to the users actions. In this case I consider them as controls on a page.
Case 2:In the stand alone case the partial could be called as part of a test directly from the browser. In this case you only see the partial part in the browser.
Case 3:In the third case the partial could be called as part of an iframe within a google chrome extension (for example). In this case you can see the partial in a page that might not have been built in your web application.
Hope this makes sense.
Thanks in advance of for those whom it concerns - happy new year.