Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Checkbox - How can i get the value ?

0 views
Skip to first unread message

Edmilson

unread,
Jun 27, 2003, 12:51:27 PM6/27/03
to
Hi,

I have an application asp.net using datalist with checkbox for each
datalist item...
I want to get the value of the item that is checked but I can´t find it.
In the classic ASP it was a little bit easy, but now I didn´t find a
property like VALUE for the checkbox.

Please, if you know that..... let me know too.....

tks
troqui


Tu-Thach

unread,
Jun 27, 2003, 1:02:43 PM6/27/03
to
You use the Checked property of the check box.

Tu-Thach

>.
>

Edmilson

unread,
Jun 27, 2003, 1:14:41 PM6/27/03
to
Ok,

But how can I get the value ?

when I put
<asp:checkbox id="chkSuppliers" runat="server"....
I dont have the property VALUE, for example
<asp:checkbox id="chkSuppliers" runat="server" VALUE="<%=....%>"
then, how can I do that ?

troqui


I´m using VB


"Tu-Thach" <tut...@yahoo.com> escreveu na mensagem
news:0de401c33ccd$ecf3f8c0$a301...@phx.gbl...

Tu-Thach

unread,
Jun 27, 2003, 1:41:45 PM6/27/03
to
I don't think you can with asp:checkbox. Check box by
design should only have boolean values (i.e. Checked).
If you want to have the value then use HTML check box
instead of ASP:

<input type="checkbox" id="chkSuppliers" runat="server"
value="YOUR VALUE">

Then, you can access the value in your code:

chkSuppliers.Value

Tu-Thach

0 new messages