Way to harness ASP.NET Ajax?

  • Thread starter Thread starter benji
  • Start date Start date
B

benji

Hi,

I've got a situation where I have a list of items that a user can select
multiple from. Pre-ajax, I would just use a CheckBoxList and would iterate
through each box upon the postback. Can I achieve something similar in an
AJAX scenario? If possible, I'd like to avoid using an updatepanel as I'd
like to base my site on page methods instead. Can I write script on the
standard HTML controls (checkboxes) that ASP.NET generates to help achieve
this? Perhaps I could have JS that would act everytime a checkbox is clicked
and modify a "summary" string containing everything that is checked (which
would have the added benefit of summarizing hte user's choices as s/he goes
along, and when it's done, push that string to a service?

I welcome any thoughts / suggestions as I'm new to ASP.NET ajax.

Thanks!

-Ben
 
I don't know that you need Ajax for this. Why not just add an onclick event
handler to standard HTML checkboxes that update a <DIV> on the page with the
"value" of the checkbox (the summary you wanted) as it is cicked.

You could also have the values added to a hidden form field value and then
that data would be submitted to the server upon a postback.

-Scott
 
Back
Top