Way to harness ASP.NET Ajax?

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
 
S

Scott M.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top