Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 90
  • Last Modified:

How to apply JQuery to an ASP.NET Repeater

I am trying to apply JQuery to an asp.net repeater control.  Basically, I have a class object list that I would like to be used as each record to be added to each iteration of the repeater.  I'd also like the repeater to update on the fly in the case that another user would like to apply an update to your repeater list.  How can this be done?  I have code already that I can show but I need guidance when it comes to JQuery and I am not fully sure how to go about it.  Anybody that can help will be helping me a big deal.  Thanks!
0
VBBRett
Asked:
VBBRett
  • 4
  • 3
4 Solutions
 
Alexandre SimõesManager / Technology SpecialistCommented:
Honestly I wouldn't use a repeater.
Although it's completely possible, mixing server side and client side code usually leads to a lot of nasty hacky techniques.

What I usually do is feed the client with a json array and generate the list client side.
Refreshing it would be as simple as performing another Ajax call... No need for updatepanel control.

Like this you have full control over your client-side generated HTML and will be much easier to maintain.

Now, what exactly do you want that jquery code to do?
0
 
VBBRettAuthor Commented:
I'm making something very similar to the Facebook Wall and although there are some differences, the basic concept is pretty much the same.  Instead of me sending data tables, I was going to send a list of a class.  The data part is all set, the store procedure pulls 10 records per page and as you continue to scroll down, another page of 10 records gets added to the page and so on.  Do you want to see my code?
0
 
Alexandre SimõesManager / Technology SpecialistCommented:
So that case justifies even more to drop any kind of server-side rendering and more everything client-side.

Instead of using a repeater server-side you "must" get the data with an ajax call and render it client-side with your template of choice. Probably a good one for you here would actually be ReactJS. It will make it easier and super fast to render a list like that.

Re-engineer the app towards the Single-Page (SPA) design
Facebook, GMail and many others use this SPA design to make the web application responsive to the user.
If you're trying to mimic the same user experience then probably you want to have a look at AngularJS and drop all the server-side rendering.

PluralSight and EggHead.io will give you a very good help rumping up in these technologies.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
VBBRettAuthor Commented:
AngularJS is becoming quite popular.  Is there any place I can find more information about Angular as far as tutorials are concerned?
0
 
Alexandre SimõesManager / Technology SpecialistCommented:
Egghead.io
PluralSight.Com

Are my main source of training material.
I also give AngularJS training if you're passing through Switzerland :-)
0
 
VBBRettAuthor Commented:
Thank you gentlemen, I will attempt your strategies and training material and will report back.
0
 
Srinivasulu MuppalaLead DeveloperCommented:
Hi VBBRett,

You can use angularJS to generate your json as result it can be table or un-order list.

http://www.w3schools.com/angular/tryit.asp?filename=try_ng_repeat_object
0
 
VBBRettAuthor Commented:
Thank you for your help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now