It's working except for one problem. When you go to the page and scroll down far enough to cause the infinite paging to kick in, and then scroll back to the top there's a drop down control on the page which is autopostback=true. When you change the value
in that drop down i get the following error:
This happens before any of the server side code in my onselectedindexchanged event fires. If you don't scroll, then the dropdown works fine. And it was working fine before i used this plugin.
Anyone have ideas what's going wrong here? I'm not very familar with jquery.
edit: Played around with some of the settings on the page and tried changing the drop down to autopostback=false and then putting a submit button on the page. Even just a standard html submit button causes the invalid json primite error. Seems like anything
that causes the page to post back, causes this error.
edit2: played around with it some more and realized it's the rad controls star rating control on the page that's conflicting some how. if i remove those from the page, then i can post back without any issues.
edit3: i think i know what's going wrong. The infinite scroll plugin works by using the pagination links on a page. It essentially loads the next page, then strips out everything except what's inside the content container and appeands the new content to
the container. So what i think is happening is my multiple controls are getting rendered with the same ID since each time it calls the next page, the server has no reason to not re-use the ID's since it thinks it's a new page. Also, all the javascript which
gets rendered for each control is not being loading since it gets rendered outside of the content container.
So - i dont suppose anyone knows of an infinite scroll that plays well with .net pages?
merk
Participant
766 Points
379 Posts
invalid JSON primitive
Feb 22, 2012 04:04 AM|LINK
I'm trying to set up infinite scrolling on a .net page using the following method: http://www.fieg.nl/infinite-ajax-scroll-a-jquery-plugin
It's working except for one problem. When you go to the page and scroll down far enough to cause the infinite paging to kick in, and then scroll back to the top there's a drop down control on the page which is autopostback=true. When you change the value in that drop down i get the following error:
System.ArgumentException: Invalid JSON primitive: .
This happens before any of the server side code in my onselectedindexchanged event fires. If you don't scroll, then the dropdown works fine. And it was working fine before i used this plugin.
Anyone have ideas what's going wrong here? I'm not very familar with jquery.
edit: Played around with some of the settings on the page and tried changing the drop down to autopostback=false and then putting a submit button on the page. Even just a standard html submit button causes the invalid json primite error. Seems like anything that causes the page to post back, causes this error.
edit2: played around with it some more and realized it's the rad controls star rating control on the page that's conflicting some how. if i remove those from the page, then i can post back without any issues.
edit3: i think i know what's going wrong. The infinite scroll plugin works by using the pagination links on a page. It essentially loads the next page, then strips out everything except what's inside the content container and appeands the new content to the container. So what i think is happening is my multiple controls are getting rendered with the same ID since each time it calls the next page, the server has no reason to not re-use the ID's since it thinks it's a new page. Also, all the javascript which gets rendered for each control is not being loading since it gets rendered outside of the content container.
So - i dont suppose anyone knows of an infinite scroll that plays well with .net pages?