Function, datagrid and findcontrol

  • Thread starter Thread starter perceval
  • Start date Start date
P

perceval

<ItemTemplate>
<asp:HyperLink id=HyperLink2 runat="server" CssClass="LABELGAUCHE"
NavigateUrl='<%# funcSite(DataBinder.Eval(Container,
"DataItem.WebSite")) %>' Target="_blank">Visit the
Website</asp:HyperLink>
</ItemTemplate>

i want in the function funcSite put hyperlink2.visible = false if there
is not a website

But i can't find the control. My datagrid name is dgWebSite

Thx
 
Alternatively, you could use another data binding expression to set
the property (assuming language="c#"):

Visible='<%# DataBinder.Eval(Container, "DataItem.WebSite") != null
%>'
 
Back
Top