HighTechTalks DotNet Forums  

server control simple bindable property

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss server control simple bindable property in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
MrB
 
Posts: n/a

Default server control simple bindable property - 12-23-2003 , 03:39 PM






I've made a server control that overrides the dropdownlist control. It has
one new property (ddlLocation) that needs to be databound. All is working
well if I type the databound information into the asp.net html view. see
example below.

<jb:jbddl id=jbddl_court_id runat="server" Width="152px"
DataValueField="court_id" DataTextField="court" svrReadOnly="False"
DataSource='<%# objCase.getCourts() %>' ddlLocation='<%# objCase("Location")
%>'> </jb:jbddl>



However I would like the user to be able to type the databinding information
(objCase("Location")) for the ddlLocation property into the visual studio
property window - the way the datasource property works. when i do that
though, the control does not resolve the objCase("Location") to a number, it
just receives the string 'objCase("Location")'.

Here is the relevant server control code.

<Category("Data"), Bindable(True)> Public Property ddlLocation() as String

Get
Return strddlLocation
End Get

Set(ByVal Value As String)
strddlLocation = Value
End Set

End Property

What do i need to do to make the ddlLocation property act the way the
datasource property does in the vs property window?

Thanks in advance,

Jim







Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.