I'm trying to implement dynamic navigation inside of web project using MVC4. All of my dynamic parts of project are displayed as partial views rendered from controller. Now I have the situation where the initial page ViewContext is not available for the Pager extension inside the PartialView, the Routes in pager rendered as domain.controller.action?pagesize=20&page=2 instead of domain/about/presscenter/news?pagesize=20&page=2. Page debug shows that I got correct ViewContext before I RenderAction, but when it hits the Pager extension it is lost. Where do I go wrong?
Why ViewContext after RenderAction PartialView is changed? Route is lost
312 Views Asked by Roman At
1
There are 1 best solutions below
Related Questions in ASP.NET-MVC-4
- SignalR client is not connecting to the hub after changing the client app's cookie name
- How I Can send question and answer by without reload web page
- Load SQL database saved MS word document to Syncfusion Document Editor
- @Html.ValidationSummary(true) throw CSP error
- Rotativa PDF export taking significantly longer on Windows Server 2016 after recent update
- Two ASP.NET MVC applications overwrite same session cookie
- List is not binding in controller, when pass it through hidden field from view in ASP.NET MVC
- Calling AJAX methods in parallel increases server response time?
- OpenCover Profiler Error : ProfilerCommunication::RequestInformation(...) => Communication (Chat channel - TrackAssembly) with host has failed
- Nested child sub menus not getting generated in Asp.Net Core MVC project
- How to show Documents on viewer when htmlmode: true in Configuration.yml file in Group Docs
- ASP.NET MVC role is trying to use SQL Server Express not the SQL Server
- Error HRESULT E_FAIL has been returned from a call to a COM component in Asp.net MVC
- How I can get total number from Database by SignalR
- Application Insights telemetry shows 'NA' from MVC 4 application behind private load balancer
Related Questions in RENDERACTION
- HTML.RenderAction not working in ASP.NET Core 6 MVC
- Is it possible to override Html.RenderAction() in ASP.NET?
- How to call controller action with a routeValue parameter in ASP.NET MVC
- RenderAction method parameters are null after a postback
- Html.RenderAction with Angular
- Passing model data onto another view
- ASP.NET MVC RenderAction in Angular 6 template
- Html.RenderAction from Admin Area into 'materializeCSS' Tabs
- ASP.NET MVC to PHP Laravel Migration: Html.RenderAction Alternative
- ASP.NET mvc RenderAction Login And Register Views
- Equivalent of Html.RenderAction in ASP.NET Core
- Call a method that returns html from an action method
- How to Render Action in view in C# MVC5?
- Passing model from view to controller using Html.RenderAction results in model being null
- RenderAction in Layout causing ActionLinks to Error
Related Questions in VIEWCONTEXT
- How to maintain the viewContext as a variable so I can leave the page while keeping viewContext saved
- Intershop - pass call parameters to component
- How do I loop through all open background view contexts and perform a save?
- Data inconsistency between coredata entity attributes in app and fetchresults query in app share extension
- Object is possibly 'undefined'. TS2532
- Can a Rails helper_method use yield as if it was invoked in the corresponding view?
- Coredata fetch request result doubles up after every request
- What's the purpose of having a ViewContext property on a Tag Helper?
- I'm trying to implement `link_to` in a flash message for an update action in a controller in Rails but I cannot get it to render to the browser
- How to use ViewContext?
- Core Data's NSPersistentContainer in iOS 10 / macOS Sierra
- Accessing Route Data from Tag Helper in ASP.NET 5 RC1
- Access to stream of ViewContext's writer
- Specify stylesheet media when rendering view with MVC ViewContext
- Caliburn Micro not support cal:View.Context at design-time?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
My Pager renders itself accepting as parameter ViewContext needed to UrlHelper.GenerateUrl() method. So I had to pass the parent ViewContext to Pager like: