I have developed a Web-based system using VS.Net (3.5 FW).
The System is used to facilitate an inspection process (on a tablet PC). I have multiple sets of mutually exclusive radiobutton lists and checkboxes.
Eg. For each item being inspected, the inspector either ticks a checkbox for "Not Inspected" or selects a score in the radiobuttonlist.
The code I wrote in ASP does work, but causes a small delay.
Is it possible to write this code in ASP to make in run more efficiently?
*** Reset Radio ***
Dim CBName As String
Dim RBName As String
Dim myCB As CheckBox = DirectCast(sender, CheckBox)
CBName = myCB.ID.ToString
RBName = "rb" + CBName.Substring(2)
Dim MyRadio As New RadioButtonList
MyRadio = CType(UpdatePanel1.FindControl(RBName), RadioButtonList)
If myCB.Checked = True Then
MyRadio.SelectedIndex = -1
End If
*** Reset Check ***
Dim CBName As String
Dim RBName As String
Dim myRB As RadioButtonList = DirectCast(sender, RadioButtonList)
RBName = myRB.ID.ToString
CBName = "cb" + RBName.Substring(2)
Dim myCheck As New CheckBox
myCheck = CType(UpdatePanel1.FindControl(CBName), CheckBox)
myCheck.Checked = False
Many thanks.
The System is used to facilitate an inspection process (on a tablet PC). I have multiple sets of mutually exclusive radiobutton lists and checkboxes.
Eg. For each item being inspected, the inspector either ticks a checkbox for "Not Inspected" or selects a score in the radiobuttonlist.
The code I wrote in ASP does work, but causes a small delay.
Is it possible to write this code in ASP to make in run more efficiently?
*** Reset Radio ***
Dim CBName As String
Dim RBName As String
Dim myCB As CheckBox = DirectCast(sender, CheckBox)
CBName = myCB.ID.ToString
RBName = "rb" + CBName.Substring(2)
Dim MyRadio As New RadioButtonList
MyRadio = CType(UpdatePanel1.FindControl(RBName), RadioButtonList)
If myCB.Checked = True Then
MyRadio.SelectedIndex = -1
End If
*** Reset Check ***
Dim CBName As String
Dim RBName As String
Dim myRB As RadioButtonList = DirectCast(sender, RadioButtonList)
RBName = myRB.ID.ToString
CBName = "cb" + RBName.Substring(2)
Dim myCheck As New CheckBox
myCheck = CType(UpdatePanel1.FindControl(CBName), CheckBox)
myCheck.Checked = False
Many thanks.