How to populate a checkbox from a database

L

Lamine Darbouche

Please help;
I have the following code in classic ASP to populate a checkbox from a
database.

<input type=checkbox name=thread <%If thread = true then response.write "
checked " end if%>>

What is the equivalent of that in .NET
Many thanks in advance.
Regards
Lamine
 
I

Itai Raz

in .Net you can have a server side component and assign a value to it the
same way you would in classic VB (chkbox.checked=true/false). You can also
do it the same way that you would with ASP, by using response.write for the
whole checkbox tag.

Open MSDN and read about ASP.Net checkbox.

--itai
 

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
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top