Solved

Dropdownlist box readonly

Posted on 2004-08-25
5
2,522 Views
Last Modified: 2008-01-09
How Can I make dropdownlist box readonly on the webpage on certain conditions

Thanks
0
Comment
Question by:jra2002
  • 2
5 Comments
 
LVL 10

Expert Comment

by:jnhorst
ID: 11897687
C#:
if (someCondition)  dropDownList.Attributes.Add("readonly", "true");

VB.NET

If someCondition Then dropDownList.Attributes.Add("readonly", "true")

John
0
 

Author Comment

by:jra2002
ID: 11902522
It is not working this syntax what you suggested,

I had fixed it with

dropdownlist.Enabled = False
0
 
LVL 10

Expert Comment

by:jnhorst
ID: 11903212
OK... Enabled/Disabled is a different property than "readonly", but that's fine.  Good that you got it working!

John
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 11947440
Closed, 20 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Moderator
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

809 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