473,786 Members | 2,737 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,checke d 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.EventArg s) 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("TotalS cored") = 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(ByV al sender As System.Object, ByVal e As
System.EventArg s) Handles btnOK.Click

' TotalScored = _Score1 + _Score2 + _Score3 + _Score4

' Me.Visible = False

'End Sub

Private Sub Option_CheckedC hanged(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles Option1.Checked Changed, Option2.Checked Changed,
Option3.Checked Changed, Option4.Checked Changed

Session("TotalS cored") = Session("TotalS cored") + 100

End Sub

Nov 18 '05 #1
0 1005

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

Similar topics

6
13024
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 is not an ASP.NET related question, but I know this group is knowledgeable and quick with responses. Thanks
1
4511
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 checkbox and I can't get it to default to checked. I tried radiobuttons and experienced the same result.. can't start them as checked. The really frustrating thing is that I set the attributes of other input controls in the Init() with no problem. ...
2
3493
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 "No", he should not have the option of clicking on any of the six checkboxes. See Code attached. Thank you so much in advance for your help as I can't get to make this combo work. <p>Did you have any problems finding any of the information...
0
1970
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 it's showing "page can not be displayed" error. This error is not happening in regular intervals and it is not possible to reproduce. Looking at the logs we’re seeing the following exception *************************************************...
2
11253
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 reflected in the page's view. For example, if following code is executed on say a click of a button var f = document.getElementById("f1"); // f1 is id of a form var i = document.createElement("input");
2
2535
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 to the 3 searchable fields) and have the page postback and requery given the selected criterion. For example, the user searches for retainer #1, which has a Tip Width of 5. So he clicks on the 5 and it searches again for all retainers that have a...
6
2423
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 one of the forms I created a Duplicate Record Button using the Wizard in Access. I have ONE user who has trouble using this button. She uses it to copy records over and over and over. Then she changes just a few pieces of data as needed. ...
1
3762
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 presses a button to do a SQL query (fill a DataSet). Before firing the query, I disable the grid/buttons and turn on UseWaitCursor. After it completes, I re-enable the grid/ buttons, refresh the dataset, then turn off the UseWaitCursor. If I...
1
3479
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 set of 3 dropdown boxes be filled with the same values. thank you <head> <SCRIPT LANGUAGE="JavaScript" type="text/javascript"> var firstChoice2 = 0; var secondChoice2 = 0;
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9496
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9961
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6745
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.