Help with image custom control

D

dave

I am working to develop an image custom control that when clicked changes
images client side. Then when a post back occurs i can determine the status
of each image. Very much like a checkbox list control but with images.

I need a little help.

Currently my control inherits from WebControl and outputs

<span id="img" onClick="fncClicked(this);"><img
src="/Testapp/Images/true.gif" border="0" /></span>

Question
1) i am not sure why the span tags after using the following code

Protected Overrides Sub CreateChildControls()

With icb
Me.Value = "checked"
Me.Attributes.Add("onClick", "fncClicked(this);")
End With

With Controls
.Add(icb)

End With
End Sub

2.) How best can i store the state of the control so that when i post back i
can determine the status? I would like to place this control in a datagrid.

thx
dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top