Get value of disabled textbox

I have a text box and this is disabled, i want to get it’s value.

can anyone tell me, how it is possible.

it’s not possible, you may make this field “readonly” then it’s value will be sent along with the form.

To elaborate on what Greg has said:

As per HTML specification, a form element must be “successful” in order to be sent to the server. Disabled elements are not considered successful (as per the same spec). You can make the element readonly or send it as a hidden form element.

Why do you want to know a value of an element which has been disabled? That’s the question you need to answer yourself and try to approach the problem accordingly.

Thanx for solve my problem.
:slight_smile:

Thanx for your suggestion.
:slight_smile:

Probably disabled element are used for viewing the details in form fields instead of tablular way.
To preserve the values you can just use the disabled elemen’ts value in hidden field with the same key value pair.

how disable element’s value can be preserve in hidden field, as we can’t get disable element’s value.

It depends on when field was disabled.
If it was disabled when form was generated by your script, you don’t need that field contents at all, cause you already have it on the server side.
If it was disabled by some javascript action in browser, same javascript can set hidden field value.

i am getting your point, i am using javascript action in browser and my problem is solved now.