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,
Just get the Textbox.Text value?
Don't forget to click "Mark as Answer" on the post that helped you.
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)
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.
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.
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);
Approva Systems Pvt Ltd,