By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,989 Members | 2,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,989 IT Pros & Developers. It's quick & easy.

Making a Textbox "readonly" usind textbox.Attributes("")

P: n/a
Hi

I need to add an attribute to a Textbox to make it read only.

To add a CSS I use

DeptDate.Attributes("Class") = "textInput"

That adds 'Class="textinput"', but the readonly is like..

<Input readonly Class="xxx" ...

How can I programatically ad the readonly bit if it doeas not have a
name like "Class" doeas?

Thx Daren

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Daren Hawes" <ne********@webdesignmagic.com.au> wrote in message
news:uM**************@tk2msftngp13.phx.gbl...
<Input readonly Class="xxx" ...

How can I programatically ad the readonly bit if it doeas not have a
name like "Class" doeas?


readonly="readonly"

Looks silly but that's how you handle the "parameter-less" attributes
nowadays.
Nov 20 '05 #2

P: n/a
Hi Daren,

Assuming you are using a webform, why not just a label with a nice border.

Cor
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.