Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PagerTagHelper baseHref NullReferenceException #2

Closed
Luckyvb opened this issue Dec 6, 2015 · 1 comment
Closed

PagerTagHelper baseHref NullReferenceException #2

Luckyvb opened this issue Dec 6, 2015 · 1 comment

Comments

@Luckyvb
Copy link

Luckyvb commented Dec 6, 2015

On dnx 4.5.1/core 1.0.0-rc1-final
Problem code:
baseHref = linkTemplate.Attributes["href"];
querySeparator = baseHref.Contains("?") ? "&" : "?";//NullReferenceException
baseHref = baseHref + querySeparator + PageNumberParam + "=";

corrected
baseHref = linkTemplate.Attributes["href"] ?? string.Empty;
querySeparator = baseHref.Contains("?") ? "&" : "?";
baseHref = baseHref + querySeparator + PageNumberParam + "=";

@joeaudette
Copy link
Collaborator

Thanks! This is now fixed in the code repo and in the nuget https://www.nuget.org/packages/cloudscribe.Web.Pagination/1.0.0-beta5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants