Solved

Dropdownlist box readonly

Posted on 2004-08-25
5
2,506 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
Comment Utility
C#:
if (someCondition)  dropDownList.Attributes.Add("readonly", "true");

VB.NET

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

John
0
 

Author Comment

by:jra2002
Comment Utility
It is not working this syntax what you suggested,

I had fixed it with

dropdownlist.Enabled = False
0
 
LVL 10

Expert Comment

by:jnhorst
Comment Utility
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
Comment Utility
Closed, 20 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Moderator
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now