Solved

Dropdownlist box readonly

Posted on 2004-08-25
5
2,521 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 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