How to get textbox value when textbox properties is readonly or enabled false

Hi ,

I have one problem, If u have idea please solve  it

To dispaly canlendercontrol iam using ajax canlender control, after selecting dateof birth into textbox

In textbox keeping textbox properites as readonly or enabled equal false,  getting that textbox value into lable,

 

 

Thanks

Ramesh 

1
ramesh
5/14/2008 6:58:23 AM
asp.net.ajax-ui 9760 articles. 0 followers. Follow

4 Replies
938 Views

Similar Articles

[PageSpeed] 50

Just get the Textbox.Text value?


Don't forget to click "Mark as Answer" on the post that helped you.
-1
tompy_nation
5/14/2008 7:43:30 AM
If I understand you correctly, you have a textbox that is disabled/readonly. You use some code to change the value in the textbox, and you want that value to be returned to your code-behind.


As far as I remember, asp.net ignores changes to a disabled controls. This is a good thing - prevents people from hacking. The way to get around this is to put a hidden field on your page, and update that value along with the textbox. Then, in your code-behind, you can retrive the value from the hidden field.

Here is a page describing the hidden field - http://www.tizag.com/htmlT/htmlhidden.php. All you need to do it put a runat="server" attribute onto it and you should be able to access this from the code-behind.
Intelligence is a burden.
Jagdip Singh Ajimal
Manchester (and yes, I am a Manchester United fan)
-1
jagdipa
5/14/2008 7:44:05 AM

I found this problem a short time ago.

In PageLoad or PageInit add to yourcode this: MyTextBox.Attributes.Add("readonly", "readonly");

It's a work around that add manualy "readonly" HTML keyword to the result tag, without any modify to the "asp.net part" of the object.


Wamba {WamBlog}
Dont forget to click "Mark as Answer" on the post that helped you.
This credits the member,earns you a point & marks your thread as Resolved.
1
Wamba
5/14/2008 7:44:24 AM

To set focus and select text of a you have to use the following:
 

ScriptManager.RegisterStartupScript(this, this.GetType(), "selectAndFocus", "$get('" + myTextBox.ClientID + "').focus();$get('" + myTextBox.ClientID + "').select();", true);
http://forums.asp.net/t/1099345.aspx
http://forums.asp.net/t/1199709.aspx

Chetan Sarode
Software Engineer,
Approva Systems Pvt Ltd,
Pune, India.
1
chetan
5/15/2008 3:14:41 AM
Reply:

Web resources about - How to get textbox value when textbox properties is readonly or enabled false - asp.net.ajax-ui

General Growth Properties - Wikipedia, the free encyclopedia
Chicago , Illinois , U.S. General Growth Properties, Inc. is an American real estate investment trust , headquartered at 110 North Wacker Drive ...

RentalRoost Brings Facebook Into Process Of Matching Up Home Seekers, Available Properties
... places to live , as RentalRoost , a San Francisco Bay-area-based website that incorporates Facebook data into its rankings of available properties, ...

Extended Profile Properties - Facebook-Entwickler
These Permissions cannot be revoked in the Login Dialog during the login flow, meaning they are non-optional for Users when logging into your ...

PortPerry Properties (@brian14mckinlay) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Hawaii Real Estate Properties for iPad on the App Store on iTunes
Get Hawaii Real Estate Properties for iPad on the App Store. See screenshots and ratings, and read customer reviews.

Qld climate change pilot study shows 4400 properties could flood in Townsville
The Queensland Government is silently preparing Queensland for an 80cm sea rise, which would impact tens of thousands of homes by the end of ...

Smart Buys: Sydney properties for less than $1 million
Domain's choice of smart Sydney properties this week.

Australian Federal Police raid properties in new CFMEU-linked investigation
Federal Police have raided properties as part of an investigation into a CFMEU organiser suspected by authorities of being bribed.

Sydney gateway: Rail line to be moved, properties affected under plan to link WestConnex to airport
A key rail line linking Sydney's west with Port Botany will need to be shifted under tentative plans to build separate motorways to Sydney Airport. ...

Queensland storms: Roofs ripped off houses in Warwick, 19,000 properties left without power
... roofs in Warwick, as wild storms move across south-east Queensland. More than a dozen homes have lost their roofs and close to 19,000 properties ...

Resources last updated: 1/2/2016 2:22:44 PM