Last post Nov 01, 2006 07:16 PM by aspuser2004
Mar 13, 2006 01:41 AM|Maleki|LINK
Hey there I've been trying to figure this your for a few days and it's been driving me nuts! I've created a date/time picker control web user control. Nothing fancy, just 5 drop down lists for year,month,day,hour and minute. I've also exposed one public
property pDateTime as a DateTime. That part was easy.
How do I make pDateTime bindable?
I'm using VB.Net 2005.
Thanks in advance,
Mar 13, 2006 09:02 AM|DiscernIT|LINK
Public Property PDateTime()
As DateTime ...
This is how in .net 1.1 .. I've not investigated any changes to this in .net 2.0 though
Mar 16, 2006 09:04 AM|Maleki|LINK
Mar 16, 2006 09:53 AM|DiscernIT|LINK
have you attached the <Bindable(True)> attribute to the property I don't see it in the code you've posted. Like I showed:
Mar 17, 2006 06:34 AM|Maleki|LINK
Mar 17, 2006 08:28 AM|Maleki|LINK
All right now that's annoying. Ok to answer your question yes I did. what I've got keeps getting stripped out in these posts. [:@]
Here I'll try it again. I can see it in the preview but it gets stripped out when it gets approved... anyway if you don't see it I've got 3 tags in the form of
"less than" Bindable "open bracket" True "close bracket" "greater than"
"less than" Browsable "open bracket" True "close bracket" "greater than"
"less than" Bindable "open bracket" quote Data quote "close bracket" "greater than"
before my Public Property wcDateTime().
<Bindable(True)> <Browsable(True)> <Category("Data")>
Public Property wcDateTime()
newDateTime = value
Mar 17, 2006 09:09 AM|DiscernIT|LINK
when you say you still can't bind data to the property, what is actually happening? are you getting an error? How are you attempting to bind data to the property?
Mar 17, 2006 11:08 PM|Maleki|LINK
Oct 27, 2006 01:20 PM|bentidy|LINK
I am having the exact same problem as the one you posted below. Did you ever solve this or discover some sort of workaround?
I haven't even gotten that far. Here's what I've done. I've created a sqldatasource. I've dropped a formview control on a webform. I click edit template and I drop my web user control and a text box into the ItemTemplate. I select edit Data Bindings on the
text box and I get the Bindable Properties Enabled, ReadOnly, Text, and Visible available to me.(and alot more if I choose show all properties. now if I go over to my control and do the same thing all I get is visible for bindable properties and if I check
show all I get enable theming and enable view state as well...
Nov 01, 2006 07:16 PM|aspuser2004|LINK
The Bindable property will not show up in the list of bindable properties. It seems that VS2005 does not see it.
However, the bindable property is accessible. You can bind to it if you switch your web page to Source mode view and add the code manually. See bellow an example of a custom datepicker UserControl used in a templated field (within a Gridview). "Text" is
a Bindable property of the UserControl.
Text='<%# Bind("CreatedDate") %>'></uc1:MyDatePicker>
Text='<%# Bind("CreatedDate") %>'></asp:Label>