We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Problem in getting TextBox value when it's ReadOnly property is set to True

Last post 05-02-2008 12:51 PM by techieanuj. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-02-2008 12:20 PM

    • techieanuj
    • Not Ranked
    • Joined on 04-16-2007
    • India
    • New Member
    • Points 105

    Problem in getting TextBox value when it's ReadOnly property is set to True

    Hi!

       I am developing an application in ASP.Net. I've a textbox in my form and I've set it's ReadOnly property to 'True'. I am getting a date in that textbox using a datePicker in Javascript. But I'm not able to get the value of the TextBox in codebehind. When I change the property ReadOnly to 'False'.. I am able to get the value of the TextBox in codebehind. I'm wondering what could be the reason for not been able to get the value of textbox when setting it's ReadOnly property to 'True'. I guess, I've done this in other projects as well.. but getting this error now.

     
    Can anyone provide some help regarding this?

    Thanks
    Anuj

     

    • Post Points: 5
  • 05-02-2008 12:51 PM In reply to

    • techieanuj
    • Not Ranked
    • Joined on 04-16-2007
    • India
    • New Member
    • Points 105

    Re: Problem in getting TextBox value when it's ReadOnly property is set to True

     Hey Friends.. I've been able to find the solution of my problem. The problem can be addressed by setting the ReadOnly property of the TextBox from the CodeBehind file as

    TextBox1.Attributes.Add("ReadOnly","ReadOnly")

    Regards
    Anuj

    • Post Points: 5
Page 1 of 1 (2 items)