Click here to Skip to main content
15,906,463 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i restrict value from being entered into a textbox using javascrip, actually the tetbox has an ajax calender extender attached to it and i dont want user to manually enter any value into the textbox. Actually i i tried using the readonly property of the textbox but after post back the content could be submitted into the database.
Posted
Comments
Jeff Blankenburg 5-Mar-13 7:59am    
What have you tried? Can you post some example code?

1 solution

try this exampal
XML
<asp:TextBox ID="TextBox1" onkeypress="return false;" runat="server"></asp:TextBox>
    <asp:CalendarExtender ID="fffddd2" runat="server" TargetControlID="TextBox1"
                    Format="MMM d, yyyy"></asp:CalendarExtender>
 
Share this answer
 
Comments
ahmedfaruk88 5-Mar-13 8:50am    
You have really saved me from a lot of troubles today, May you be showered with abundant knowledge. Thanks. Please can i always contact you by mail when i need to get things done. I'll appreciate of you accept my offer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900