开发者

Compiles fine but have problem publishing whit updatable option

开发者 https://www.devze.com 2022-12-16 01:03 出处:网络
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:

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 ha开发者_运维知识库ve 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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号