Property and <%# ... %>

  • Thread starter Thread starter Laurent
  • Start date Start date
L

Laurent

Hi,

I'm writing a Custom Control which have a public property named DataAdapter:

<Category("Données")> _
Public Property DataAdapter() As SqlDataAdapter
Get
Return _dataAdapter
End Get
Set(ByVal Value As SqlDataAdapter)
_dataAdapter = Value
End Set
End Property

This property is visible in the property window where i can choice one of my
SQLAdaptater. But the HTML Code is wrong :

<cc:MyCC id="MyCC1" runat="server" DataAdapter="SqlDataAdapter1"></cc:MyCC>

.... instead of ...

<cc:MyCC id="MyCC1" runat="server"
DataAdapter="<%#SqlDataAdapter1%>"></cc:MyCC>

Please, I need help !

Laurent
 
Did you drag your custom control onto the designer and end up with this ?,
If so what happens if you correct the code manually?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
 
Yes, I drag my custom control from the toolbox onto the designer and I
change his properties.
If I correct the code manually, that's work : the control manage the
SQLAdaptater.
 
There might be a conflict in the namespace and the IDE is renaming it, try
changing the control name to something else.
 
I renamed the property : no change...


One Handed Man ( OHM - Terry Burns ) said:
There might be a conflict in the namespace and the IDE is renaming it, try
changing the control name to something else.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .


this
 
I was referring to the defaul value its getting from your control
'sqlDataAdapter'
 
Back
Top