What is the best way to bind a repeater to an AJAX response?
Posted
by Murtaza RC
on Stack Overflow
See other posts from Stack Overflow
or by Murtaza RC
Published on 2009-07-16T19:36:39Z
Indexed on
2010/03/31
1:03 UTC
Read the original article
Hit count: 421
I am trying to bind a repeater after an AJAX response.
Step 1 : Make an Ajax call to the fucntion in the code behind:
Step 2 : Do some business logic and finally bind the data to the repeater
Step 3 : Get the response back from the codebehind to the Ajax call
Step 4 : Once we get the response back what is the right way to strip out extra HTML for example the head and body tags etc.
One way is to put a "breaker" logic. for example :
<html><body>
#breaker
REPEATER control HERE
#breaker
</html></body>
and once I get the response back I use a JS function to find anything between the #breaker tags and strip out anything outside and I should get the required HTML response of only the repeated items.
Is this the only / Best way to achieve this kind of functionality?
© Stack Overflow or respective owner