i have created a user control for text box to enter date. I have saved time and effots to type for each text (date) box code to check date validity and key typed. but i have lost text and locked property of text box as it is not available on user control. can this text and locked property of text box on user control can be accessed any other way.


but i have lost text and locked property of text box as it is not available on user control. can this text and locked property of text box on user control can be accessed any other way.

Do you mean typing on the textbox is disabled? (I'm confused) :confused:

You can use code if it is the case. Create a command button/s to enable or disable the text control by using the Locked setting.

'On a command button (e.g cmdEnable)

Text1.Locked = False ' Can be set to True if you wish to lock the control
                     ' Locked property can also be set at design time

You can also use the Enabled property (design or run time)

Text1.Enabled = False ' Can be set to True to enable entry of inputs
                      ' Can also be set during design

i want to transfer date from textbox to database or from database to text box in user cintrol.

in the attached example when i type date in text box how can i display the date in massage box when i click on command button.

thanks

You can drop the user control, its crap.

Have a look at the attached sample, I have added the code you need. Also have a look at the references in the application to see why its working.

Cannot open Attached Zip File see attached message.

I'm not sure where Drive G: comes from. I have unzipped the file twice on my system using winzip successfully. Maybe you don't have all privileges on drive G...?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.