Identification of User Control?

Asked

Viewed 13 times

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.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.