1
I’m trying to use a User Control with VB
and is created as follows:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SigaFormacao.ascx.vb"
Inherits="SigaFormacao" %>
Page using User Control:
<%@ Register Src="../PortalControls/SigaFormacao.ascx" TagName="SigaFormacao" TagPrefix="uc1" %>
(...)
<uc1:SigaFormacao ID="SigaFormacao1" runat="server" />
Code:
Dim gv As GridView = CType(SigaFormacao1.FindControl("GVFormacao"), GridView);
Line where accuses "Sigaformacao1" is not declared. It may be inaccessible due to its protection level. And this gives compilation error
You have to put the whole page, there’s no way to say it like that, and if inside that component is a Gridview we need to know how you’re doing this
control
, then post everything.– novic