Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 12th, 2007, 03:30 PM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default voting issue!

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
 
Old January 12th, 2007, 03:41 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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--------------------------
-----------------------------------------------------------
 
Old January 12th, 2007, 03:46 PM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, I just want to display them in textboxes..

Diana
 
Old January 12th, 2007, 04:14 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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--------------------------
-----------------------------------------------------------
 
Old January 12th, 2007, 04:42 PM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, I used sessions for that, but it still doesn't increase the number of voters on the next page....

Diana
 
Old January 12th, 2007, 05:04 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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--------------------------
-----------------------------------------------------------
 
Old January 12th, 2007, 06:02 PM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks :)

Diana
 
Old January 12th, 2007, 06:13 PM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks,
I am not going to use it in a website...it was a training question i wanted to solve....
:)

Diana
 
Old January 13th, 2007, 02:35 AM
Authorized User
 
Join Date: Jul 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to abeen
Default


You can use Session or ViewState to store the data.;)

============================================
  Success grows out of struggles to overcome difficulties.
Email:abeen8298@gmail.com
============================================
 
Old January 13th, 2007, 09:28 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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--------------------------
-----------------------------------------------------------





Similar Threads
Thread Thread Starter Forum Replies Last Post
Design issue davetx C# 2005 3 February 16th, 2008 01:30 PM
HOW TO USE VOTING BUTTONS pipistrella75 Classic ASP Professional 0 November 21st, 2006 05:34 AM
Voting system for gsm modem sime_tyres VB How-To 0 August 8th, 2006 10:50 AM
Including voting buttons in an email mswombat Classic ASP Professional 0 December 19th, 2005 02:11 PM
Another issue islandtiu BOOK: Beginning ASP 3.0 1 February 14th, 2005 11:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.