Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 12th, 2007, 03:30 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
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
  #2 (permalink)  
Old January 12th, 2007, 03:41 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
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--------------------------
-----------------------------------------------------------
  #3 (permalink)  
Old January 12th, 2007, 03:46 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Diana
  #4 (permalink)  
Old January 12th, 2007, 04:14 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
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--------------------------
-----------------------------------------------------------
  #5 (permalink)  
Old January 12th, 2007, 04:42 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
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
  #6 (permalink)  
Old January 12th, 2007, 05:04 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
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--------------------------
-----------------------------------------------------------
  #7 (permalink)  
Old January 12th, 2007, 06:02 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks :)

Diana
  #8 (permalink)  
Old January 12th, 2007, 06:13 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
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
  #9 (permalink)  
Old January 13th, 2007, 02:35 AM
Authorized User
 
Join Date: Jul 2006
Location: DongYing, , China.
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
============================================
  #10 (permalink)  
Old January 13th, 2007, 09:28 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
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--------------------------
-----------------------------------------------------------
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 02:36 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.