?
Solved

readonly property for checkbox in asp.net

Posted on 2003-03-24
5
Medium Priority
?
883 Views
Last Modified: 2010-08-05
is there a way to make the checkbox readonly. enabled property will work for me but i don't want the ckechbox to be grayed out. i have seen there is a readonly property for textbox object but not for checkbox which does what i want.

Thanks,
AJ.
0
Comment
Question by:avisjk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 28

Expert Comment

by:iboutchkine
ID: 8196278
Create image with checkbox and show or hide it
0
 
LVL 6

Accepted Solution

by:
CarlosMu earned 60 total points
ID: 8196537
You can also put code on the check event.  I presume that you dont want to always have the checkbox disable but want sometimes to allow the user to change the content and sometimes to prevent it.  If so you will need some kind of bolean variable to indicate that change is not allowed.  On the check event check that boolean if it is on then just change the value back.  To the user it will look just as if the check box never changed.
0
 
LVL 1

Author Comment

by:avisjk
ID: 8210950
Carlos,

i thought about it, but to do this i will have to set the checkbox's autopost to true and this will cause a roundtrip to server, so i wanted to avoid that.

Thanks,
AJ.
0
 
LVL 6

Expert Comment

by:CarlosMu
ID: 8211204
Not if the code is Javascript runing on the client,  Attached to the click event of the checkbox
0
 
LVL 1

Author Comment

by:avisjk
ID: 8212946
i am trying to do make it work even on browsers where javascript is disabled. thats the reason i am doing all my validation on the server side.

Thanks,
AJ
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question