473,499 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

responding to option.checked in a user control ?

I have a user control with four option buttons depending which option button
is pressed I store a score into session object. On the load event of a
control the session object is set to 0. There is an optionchecked handler
that handles option1.checked,option2,checked etc . This is supposed to
update the sessionobject with a score ie 100

A beak point on the handler shows it is never reached. when this control is
placed on a page

Any idea what I have to do to get the current score from the control.

What I am after is a for each instance of the control on the page, add up
the score to produce a total score.

code of the control is:

any assistance would be appreciated ?

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'as this is multiple choice there is one question with up to four possible
answers

'Each answer has a score assigned to it

'when the question is anwered the total score is calculated for the question
and

'returned in the total Score property for the question

Session("TotalScored") = 0



End Sub

#Region "Properties"

Property QuestionID()

Get

End Get

Set(ByVal Value)

End Set

End Property

Property question()

Get

End Get

Set(ByVal Value)

End Set

End Property

Property Answer1()

Get

End Get

Set(ByVal Value)

End Set

End Property

Property Answer2()

Get

End Get

Set(ByVal Value)

End Set

End Property

Property Answer3()

Get

End Get

Set(ByVal Value)

End Set

End Property

Property Answer4()

Get

End Get

Set(ByVal Value)

End Set

End Property

Property Score1()

Get

End Get

Set(ByVal Value)

End Set

End Property

Property Score2()

Get

End Get

Set(ByVal Value)

End Set

End Property

Property Score3()

Get

End Get

Set(ByVal Value)

End Set

End Property

Property Score4()

Get

End Get

Set(ByVal Value)

End Set

End Property

Property TotalScored()

Get

End Get

Set(ByVal Value)

End Set

End Property

#End Region

'Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnOK.Click

' TotalScored = _Score1 + _Score2 + _Score3 + _Score4

' Me.Visible = False

'End Sub

Private Sub Option_CheckedChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Option1.CheckedChanged, Option2.CheckedChanged,
Option3.CheckedChanged, Option4.CheckedChanged

Session("TotalScored") = Session("TotalScored") + 100

End Sub

Nov 18 '05 #1
0 994

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
12962
by: Chris Fink | last post by:
Does anyone know it is possible to include a small image(.gif .jpeg) within a <SELECT><option> so that the user would see the option text as well as a little image(icon) in the option? I know this...
1
4485
by: dx | last post by:
I'm extremely frustrated with ASP.NET...again! To me this should be as simple as setting oCheckBox.Checked = True.. yet for some reason it isn't. I have a user control (ascx) that that has a...
2
3455
by: NishSF | last post by:
Would anyone have any suggestions/javascript code so that if one clicks the Radio Button "Yes" below he has the option of selecting any of the six CheckBox below. If the user clicks on Radio Button...
0
1946
by: Sinchana | last post by:
Hi All, In our .Net 2.0 Application ,we have a third party Tree Control. We are loading the Tree control nodes using a stored procedure and the tree nodes are populating perfectly.But some time...
2
11238
by: Manish Tomar | last post by:
Hi All, As far as my understanding of HTML DOM aka DHTML goes, is that if the DOM structure of HTML document is changed programmatically using JavaScript in the browser, it immediately gets...
2
2483
by: CJM | last post by:
I have a page that allows the user to search a DB by querying one of 3 fields. When results are returned, I want the user to be able to click a value in one of three columns (that directly relate...
6
2411
bwesenberg
by: bwesenberg | last post by:
I have created an Access Front End Database that many people in one of the departments use. Each user has their own copy of the Front End on their Computer. The Back End is on a SQL Server. On...
1
3712
by: Aegixx | last post by:
Ok, extremely wierd situation here: (I'll post the code below, after the explanation) I've got a Windows application (.NET 3.5) that has a single Form with a DataGridView embedded. The user...
1
3444
by: bytesFTW99 | last post by:
I have been struggling with this for some time can anyone help out? just trying to have 3 dropdown boxes that fill depending on what is selected, then in some cases click a button and have the second...
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7386
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.