Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with UserControl
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Problem with UserControl
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01329552
Message ID:
01329552
Views:
59
Hi everybody,

I've tried to create a new user control which I'm calling at the page like this
UndoSave:UndoSaveButtons ID="btnRegular" runat="server" CreatedOn ='< %# Bind("CreatedOn")% >' LastUpdated = '< %# Bind("LastUpdated")'
CreatedOn and LastUpdated are datetime fields from the database that I'm getting using a stored procedure.

In my user control I defined them as DateTime like this
[Bindable(true, BindingDirection.TwoWay), Category("User-Defined")]
public DateTime CreatedOn
    {
        set
        {
            this.litCreatedOn.Text = value.ToShortDateString() ;                 
        }        
    }
May be I have to add get for this property?

I'm getting an error Error 1 Cannot create an object of type 'System.DateTime' from its string representation '< %# Bind("LastUpdated")' for the 'LastUpdated' property.

Do you know what could be wrong here and how can I fix the problem?

Thanks in advance.

UPDATE. Disregard, it was just my own typo.
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform