views:

96

answers:

1

Hello evey one,

I have a web site developed on VS2005. that compiles fine.
But when i try to publish it whit the "Allow this web site to be updatable" i get the following compiller error:

error BC30002: The type 'ASP.ucDireccion' is not defined.

The problem seams to be related to a user control im accesing its public properties and methods.
I have the user control on the page and have also put the <@register> directive on the page.

here is the relevant code where te compiler indicates the errors

- Private Sub CargarDireccionAControl(ByVal ctrlDireccion As ASP.ucDireccion)

- Dim ctrl As ASP.ucDireccion = CType(Me.pnl_AdicionarSolicitudes.FindControl(id_Control), ASP.ucDireccion)

and several others

Here are the relevant parts of the ASPX page:

<%@ Page EnableEventValidation="false" Language="VB" MasterPageFile="~/Principal.master"
    AutoEventWireup="false" CodeFile="AV_SolicitudVerificacion.aspx.vb"      Inherits="Verificaciones_AV_SolicitudVerificacion"
     Title="Untitled Page" %>


<%@ Register Src="wucMapa.ascx" TagName="wucMapa" TagPrefix="uc2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="../UserControls/ucDireccion.ascx" TagName="ucDireccion" TagPrefix="uc1" %>
<%@ Reference Control="../UserControls/ucDireccion.ascx" %>
<%@ MasterType VirtualPath="~/Principal.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
 <ContentTemplate>
 <asp:UpdatePanel ID="up_Solicitudes" runat="server">
                             <ContentTemplate>
...
...
...



                       <cc1:CollapsiblePanelExtender ID="cpeMapa" runat="server" Collapsed="True" TargetControlID="pnl_mapa">
                            </cc1:CollapsiblePanelExtender>
                            <asp:Panel ID="pnl_mapa" runat="server" BorderColor="WhiteSmoke" ForeColor="Black" BackColor="White" BorderStyle="Solid" HorizontalAlign="Center">
                            <uc2:wucMapa ID="wucMapa1" runat="Server" />
                            <asp:Button ID="bt_CancelarMapa" CssClass= "boton_azul" runat="server" CausesValidation="False" Text="Cancelar"  OnClick="cancelarSolicitud"/></asp:Panel>
                            &nbsp;
                            <uc1:ucDireccion ID="ucSolicitudDomicilio1" runat="server" TipoSolicitud="Domicilio"
                                Visible="false" />
                            <uc1:ucDireccion ID="UcSolicitudTrabajo1" runat="server" TipoSolicitud="Trabajo"
                                Visible="false" />
                            <uc1:ucDireccion ID="UcSolicitudTrabajo2" runat="server" TipoSolicitud="Trabajo"
                                Visible="false" />
                            <uc1:ucDireccion ID="UcSolicitudTrabajo3" runat="server" TipoSolicitud="Trabajo"
                                Visible="false" />
                            <uc1:ucDireccion ID="UcSolicitudTrabajo4" runat="server" TipoSolicitud="Trabajo"
                                Visible="false" />
                            <uc1:ucDireccion ID="UcSolicitudTrabajo5" runat="server" TipoSolicitud="Trabajo"
                                Visible="false" />
    </ContentTemplate>
</asp:UpdatePanel>
...
...

the user control relevant parts

<%@ Control  className="ucDireccion" Language="VB" AutoEventWireup="false" CodeFile="ucDireccion.ascx.vb" Inherits="ucDireccion"  %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
...
...

You should note that when i unchek the "Allow this web site to be updatable" option of the publish dialag. it works fine.

Thanks very much for your time

Regards Hugo

A: 

Why is this line:

<%@ Reference Control="../UserControls/ucDireccion.ascx" %>

surrounded with **?

What happens when it's included first thing in the page or just after the @Page directive? I'd say that putting it may solve the problem.


Also check this post if you haven't already:
http://rbgupta.blogspot.com/2007/06/turning-ascx-user-control-into.html

Mohamed Meligy
Hi Mohamed,i'll try moving the reference statement up and get back to you, the are an edition error(** = bold)
ktstzo
Hi i changed the <%@ Reference Control="../UserControls/ucDireccion.ascx" %>Up and i istill get the same error ` BC30002: El tipo 'ASP.ucDireccion' no está definido.
ktstzo
Can you reproduce the issue on some File->New->Website kind of thing? I tend to think maybe you have some issue in markup or such that VS is tolerant with when you are working normally but not when making the versions.Also, have you tried as a dirty workaround to just copy the website instead of publishing it?
Mohamed Meligy
I will, lets see if i can reproduce itthank very much for your time
ktstzo