|
-
Apr 30th, 2003, 10:48 PM
#1
Thread Starter
Member
Resusable Date Control
Hi,
An application installed in my company requires a lot of date entry. To assist users, the date text boxes have a "mask?" of " / / " to allow the entry of European dd/mm/yyyy dates (and to re-inforece that the text box only accepts dates).
When the textbox has the focus the following mask appears "__/__/___". The textbox only allows entry of numbers.
When the control loses focus, the date is verified, or message box prompts the user to enter a correct date and returns the focus to the control.
The control also allows the UP and DOWN buttons to be pressed to add or subtract a day from the control. if the control is empty, it has inserted the current date.
I wish to implement this functionality on a project I am working on in VB.Net. I suppose this is easy enough, but I would like to know how to make the above REUSEABLE so it does not have to be re-coded for each date field within a project.
I am quite a beginner in VB.Net and don't know muh of the correct/best way to do things, AND the correct Terminology to use/ask questions.
Can someone provide some instrution/help on this matter?
I am suprised to find these sorts of things do not come standard.
Thanks!!!,
-
May 1st, 2003, 01:01 PM
#2
Addicted Member
I haven’t done this yet, but I'm pretty sure what you want is to create a custom control, and then you can just drop it on any page you need it.
http://docs.aspng.com/quickstart/asp...authoring.aspx
-Daryl
"Two More Rolls of Duct tape, and the world is mine!"
VB.NET Guru
-
May 1st, 2003, 01:14 PM
#3
Make a class.
Inherit the TextBox control.
Code it to do what you need.
Use the class when needed
Profit
-
May 1st, 2003, 04:53 PM
#4
Thread Starter
Member
Hmm,
Thats the problem.. I don't know how do to that kind of stuff, although I am very interested to learn.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|