|
Subject:
|
voting issue!
|
|
Posted By:
|
D86j
|
Post Date:
|
1/12/2007 2:30:42 PM
|
Hello All,
Well, I have a RadioButtonList with some values(answers for a question) i added manually, I want to know how i can get the number of people who voted for each item of that RadioButtom, the results should be displayed in the second page....(like the result of voting)...
I think it's a very easy vb code, but it doesn't work with me!, each time I click on one of the RadioButtons the result is increased by one but then gets 0 again when I reload the page....
can u help me in that please, thanks
Diana
|
|
Reply By:
|
dparsons
|
Reply Date:
|
1/12/2007 2:41:56 PM
|
Are you storing the results in a database?
----------------------------------------------------------- I will only tell you how to do it, not do it for you.------------ Unless, of course, you want to hire me to do work for you.--- ^^Thats my signature-------------------------------------- ----------------------------------------------------------- http://www.catb.org/~esr/faqs/smart-questions.html ------- ^^Took that from planoie's profile-------------------------- -----------------------------------------------------------
|
|
Reply By:
|
D86j
|
Reply Date:
|
1/12/2007 2:46:24 PM
|
No, I just want to display them in textboxes..
Diana
|
|
Reply By:
|
dparsons
|
Reply Date:
|
1/12/2007 3:14:07 PM
|
How do you intend to keep a running tally of all votes cast? Session variables are only good for x user's session.
----------------------------------------------------------- I will only tell you how to do it, not do it for you.------------ Unless, of course, you want to hire me to do work for you.--- ^^Thats my signature-------------------------------------- ----------------------------------------------------------- http://www.catb.org/~esr/faqs/smart-questions.html ------- ^^Took that from planoie's profile-------------------------- -----------------------------------------------------------
|
|
Reply By:
|
D86j
|
Reply Date:
|
1/12/2007 3:42:59 PM
|
Yes, I used sessions for that, but it still doesn't increase the number of voters on the next page....
Diana
|
|
Reply By:
|
dparsons
|
Reply Date:
|
1/12/2007 4:04:13 PM
|
Ok I am having a hard time understanding what you are tyring to do, it doesn't seem logical. In any case if you want a tally of how many times the user voted for 1 item you would need a session variable for each answer in your list so
if a Session("something") = Convert.ToInt32(Session("Something")) + 1 if b Session("something2") = Convert.ToInt32(Session("Something2")) + 1
And so on.
In so far as polls are concerned, this not only isnt functional for your entire site, it is alot of coding.
----------------------------------------------------------- I will only tell you how to do it, not do it for you.------------ Unless, of course, you want to hire me to do work for you.--- ^^Thats my signature-------------------------------------- ----------------------------------------------------------- http://www.catb.org/~esr/faqs/smart-questions.html ------- ^^Took that from planoie's profile-------------------------- -----------------------------------------------------------
|
|
Reply By:
|
D86j
|
Reply Date:
|
1/12/2007 5:02:19 PM
|
Thanks 
Diana
|
|
Reply By:
|
D86j
|
Reply Date:
|
1/12/2007 5:13:24 PM
|
Thanks, I am not going to use it in a website...it was a training question i wanted to solve....

Diana
|
|
Reply By:
|
abeen
|
Reply Date:
|
1/13/2007 1:35:05 AM
|
You can use Session or ViewState to store the data.
============================================ Success grows out of struggles to overcome difficulties. Email:abeen8298@gmail.com ============================================
|
|
Reply By:
|
dparsons
|
Reply Date:
|
1/13/2007 8:28:07 PM
|
Ahh well i am glad you got it solved
----------------------------------------------------------- I will only tell you how to do it, not do it for you.------------ Unless, of course, you want to hire me to do work for you.--- ^^Thats my signature-------------------------------------- ----------------------------------------------------------- http://www.catb.org/~esr/faqs/smart-questions.html ------- ^^Took that from planoie's profile-------------------------- -----------------------------------------------------------
|