deagon
Posts: 31
|
| Posted: 02/19/2007, 1:41 PM |
|
I know this must be a simple Question but how do get a simple current date to display in a
label. All I want is when opening a specific form it displays the current date at the top. Like I said pretty simple...
|
 |
 |
peterr
Posts: 5971
|
| Posted: 02/19/2007, 1:55 PM |
|
Simple indeed. Here is how: http://docs.codecharge.com/studio31/html/Components/Pro...tValue.html?toc
Basically you'd type an ASP function into the Default Value field. Now() for current date/time or Date() for current date.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
deagon
Posts: 31
|
| Posted: 02/19/2007, 2:10 PM |
|
Thanks for the Feedback. Its still not displaying the date. I setup the default value as date() and it doesn't set the date in the label its blank.
|
 |
 |
peterr
Posts: 5971
|
| Posted: 02/19/2007, 3:08 PM |
|
Strange. Try entering "ABC" as the Default Value property (including quotes) to check if the Label and Default Property work at all in your case.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
mrachow
Posts: 509
|
| Posted: 02/20/2007, 1:21 AM |
|
One thing is to check the Data Type of the label.
If the label is tied to a database it will be set to the default value only for newly inserted records not for existing records even when the field is empty.
In case the lable is a "freestanding" one I'm not sure if default value is used.
Maybe you have to use the action Retrieve value for control in Before Show event.
_________________
Best regards,
Michael |
 |
 |
deagon
Posts: 31
|
| Posted: 02/20/2007, 8:12 AM |
|
You might think this simple!! But I can create the simple display date on another project with no problem. However on this project I'm using labels to display data with CCDLookup and other controls. It will not display the date at all or text. Whats up is there an issue with using too many labels direct to web page??? It will not display date not matter what I try.
Help.....
|
 |
 |
deagon
Posts: 31
|
| Posted: 02/20/2007, 8:54 AM |
|
It works... Because I'm using controls to display data to the web page using labels and CDLookup it does not display a standard label with the date as default value. So i'm using
Before show and control fuction to display the date. Its not idea but it works.
Thanks for all your help guys, you sure make it alot Easier to get some skills in developing
in ASP.
|
 |
 |