Increment Counter

A

Arpan

An ASP page has a variable named iCounter whose initial value is 0.
This ASP page has a drop-down list. When an option is selected from the
drop-down list, I want the value of the iCounter variable to increment
by 1. For e.g. when an option is first selcted, iCounter should be
equal to 1. When an option is selected again, iCounter should be equal
to 2 so on & so forth. How do I do this?

Thanks,

Arpan
 
C

Curt_C [MVP]

this is clientside....unless you want the page to postback to the server on
every click? You'll have to add an onclick event to it and tie it to a
javascript function to increment a value.
Followup in a clientside/javascript group possibly, if you need more
specifics.
 

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
474,266
Messages
2,571,081
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top