Comments (3)
I don't consider it a bug that you have to provide routing information such as controller action and route params. you have to do that also for anchor tag why should this be any different? I don't think it should auto parse anything from the url of the current request or make any assumptions about ambient query string params.
from cloudscribe.web.pagination.
anchor tag is for a specific url: one link for one page, difference querystring might have different content. But this library Pagination is for a list to move next or forward, so it's very important to make sure it's the same list between (Next Page or Previous Page) and current Page. Another reason is that to preserve the search queryString in action,viewBag,and Pagination for every action is very hard (multi search box).
from cloudscribe.web.pagination.
yes you should preserve the needed params in your viewmodel (from the current request) and use it to pass the route params to the pager, the pager should not try to guess what you want.
If you want an example, I'm using it for search in a number of places in cloudscribe Core project, for example in role administration to search for roles and role members and role non members. In all cases I'm providing the needed route parameters to the pagertaghelper from my viewmodel
Example view, viewmodel, controller
it is your job to pass what you need for routing it is not the job of the pagertaghelper to try to guess it.
if you want that you can always fork the project and implement it as you think it should be
from cloudscribe.web.pagination.
Related Issues (20)
- Changing css of cs-pager HOT 1
- totalitems with long type HOT 4
- Reference to cloudscribe.Pagination.Models HOT 5
- ToPagedList performance on IQueryable implementation HOT 1
- EINVRES Request to https://bower.herokuapp.com/packages/jquery failed with 502 (fix included) HOT 1
- CompatibilityVersion.Version_2_2 causing NRE HOT 1
- Remove Next and Previous Links HOT 2
- hashtag HOT 4
- reconsider support preserve querystring for creating link HOT 3
- `PagedResult<T> where T : class` why class is needed? HOT 3
- Calling Javascript functions HOT 6
- Add .NET Core 3.0 support HOT 9
- Add netstandard 2.1 Support HOT 1
- Can't use page for cs-pagenumber-param HOT 3
- Problem with total Items
- Please upgrade to .net 6 HOT 4
- How to target another page in Pager Links
- Plans to support .NET 7? HOT 1
- Bootstrap 5 support? HOT 4
- Test and fix demo Pagination web application HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudscribe.web.pagination.