I've been reading and trying to figure out a way for half a day yesterday, and any solutions seems to fit to this.


My solution is building up xml files from different folders on another server. After the xml is built up, I can run a "File Mapping" which will grab the appropriate information from the a specific xml selected with a dropdown and pass it to the asp:repeater. The binding is done on load, reading all the xml elements and passing it to a collection of object that will be bound to the repeater ( results.DataSource = listOfObjects; results.DataBind(); )

Now here is the problem. In each row of the table there is columns containing static informations and the last cell of the row is an img button that represent a gray checkmark and that on click should change to green. However, onclick now I only change the data to the xml, and on next "File map" it'll be there. I cannot simply refresh the page, because it takes a fairly long amount of time to refresh because most of the times there is over 350 records to load and above that, you cannot simply refresh page because the page is call through ajax and a refresh will bring you back to the default.aspx.

I've already built a function to get the param back through jQuery, however I really have no clue how to bind it to the image.

Current line with image:

<a href="JavaScript: // Toggle Status" onclick="PutParam('<%= ProjectId %>', '<%# Eval("TargetUrl") %>', 'IsQAComplete', '<%# ((bool)Eval("IsQAComplete")) ? "False" : "True" %>', '<%= Lang %>', '<%= ProjectName %>'); "><img height="12" width="12" title="Toggle completion status" src="images/<%# ((bool)Eval("IsQAComplete")) ? "complete" : "incomplete" %>.png" /></a>

IsQAComplete being the bool used used for checkmark which is referring to the listObject. <--- the listObjects Collection remains unchanged

'Get what the checkbox state should be referring to xml file.

GetParam('<%= ProjectId %>', '<%# Eval("TargetUrl") %>', 'IsQAComplete', '<%= Lang %>', '<%= ProjectName %>');

Thank you, hopefully someone can help me :)

Given that the Ajax call might fail, you presumably want to set the checkmark to green only when the Ajax call has signalled that it has successfully completed.

So I think what you need is to pass this (as an additional parameter) into PutParam(), such that PutParam() knows which DOM element to address when the successful Ajax response arrives.

Inside the Ajax response handler, you need a DHTML statement of the form :

element.style.color = '#009900';

where element is PutParam's formal parameter representing the checkmark (passed in as this from the onclick).