If I read you correctly, you are attempting to set radiobuttons or
checkboxlist items with image buttons, giving the user two ways to set the
selected value(s). If so, let's forget the radiobuttonlist for a moment, as
only one radio button can be checked at any one time, making it the easier
problem to solve.
You can wire all buttons to the same click event. I do not know the VB
syntax to have multiple controls hit the same event, but it is the addition
of a simple delegate assingment in C#. You can easily do this dynamically,
so the buttons will be wired without having to know how many there are. You
then determine which button sets which checkbox, but this is done as you
render the list, so it is not difficult.
When a button is clicked, you call a separate routine that runs through all
of the checkboxes and determines which are checked and which are not. Make
it a separate routine, for reuse. You will call the same routine when you
submit the form, for example.
Hope this helps.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*********************************************
Think outside the box!
*********************************************
"Andreas Wöckl" <wo****@esys.atwrote in message
news:Oq**************@TK2MSFTNGP03.phx.gbl...
HI Group!
I have to programmatically create a user input form with various Checkbox
and RadioButton lists - Beside every List I have to place an image button
that is able to reset the checkboxlists and radiobutton lists.
if i declare a variable with
private withEvents img as ImageButton
and have a sub with..
Protected Sub Click1(ByVal sender As Object, ByVal e As
System.Web.UI.ImageClickEventArgs) _
Handles img.Click
msgbox("test")
End Sub
My Code for examle iterates 2 times but only one event is captured. So how
can I assure that every event of my buttons (could be 20 or more) is
captured. I would need to reset the value of specific controls with that
code!
Many thanks in advance!
best regards
andy