Search:
Namespaces
Discussions
.NET v1.1
Feedback
error en aspnet control
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngcontrolscs' list
.
Daniel Chavez
hi guys:
i'm problem in aspnet control:
--------------------------------------------------------------------------------
tengo un problemilla al hacer un aspnet control,
mi control es:
MiPrimerControl.cs
using System;
using System.Web;
using System.Web.UI;
namespace pruebas
{
public class MiPrimercontrol : Control
{
protected override void Render(
HtmlTextWriter
writer)
{
writer.Write("<h1>Control ASP.NET Desarrollado en C#</h1>");
}
}
}
mi pagina es:
<%@ Register TagPrefix="cc" Namespace="pruebas" Assembly="MiPrimerControl" %>
<%@ Page language="c#" Codebehind="control.aspx.cs" AutoEventWireup="false" Inherits="pruebas.control" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>control</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="
http://schemas.microsoft.com/intellisense/ie5"
;>
</HEAD>
<body MS_POSITIONING="GridLayout">
<cc:MiPrimerControl runat="server" id="MiPrimerControl1" />
</body>
</HTML>
lo he compilado con:
set outdir="c:\inetpub\wwwroot\daniel\pruebas\bin\MiPrimerControl.dll"
set assemblies=System.dll,System.Web.dll
csc /t:library /out:%outdir% /r:%assemblies% MiPrimerControl.cs
pero me sale el error que sigue, que podría estar pasando??
--------------------------------------------------------------------------------
Server Error in '/daniel/pruebas' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1595: 'pruebas.MiPrimercontrol' is defined in multiple places; using definition from 'C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\daniel_pruebas\a7ac26a3\e99b3f4\assembly\dl\969dfbe8\108c94ae_6902c201\pruebas.DLL'
Source Error:
Line 11: </HEAD>
Line 12: <body MS_POSITIONING="GridLayout">
Line 13: <cc:MiPrimerControl runat="server" id="MiPrimerControl1" />
Line 14: </body>
Line 15: </HTML>
Source File:
http://localhost/daniel/pruebas/control.aspx
Line: 13
Atte.
Daniel Chavez B
Tel: (511) 7409455
Reply to this message...
Michael
It's because you've been adding and deleting the control from the form.
Occasionally VS.NET doesn't clean up the code properly.
Check your code.
Delete the control from the form and remove all references to it in your
code and try re-adding it again.
-----Original Message-----
From: Daniel Chavez [mailto:
Click here to reveal e-mail address
]
Sent: Friday, 24 May 2002 1:09 AM
To: aspngcontrolscs
Subject: [aspngcontrolscs] error en aspnet control
hi guys:
i'm problem in aspnet control:
----------------------------------------------------------------------------
--
tengo un problemilla al hacer un aspnet control,
mi control es:
MiPrimerControl.cs
using System;
using System.Web;
using System.Web.UI;
namespace pruebas
{
public class MiPrimercontrol : Control
{
protected override void Render(
HtmlTextWriter
writer)
{
writer.Write("<h1>Control ASP.NET Desarrollado en C#</h1>");
}
}
}
mi pagina es:
<%@ Register TagPrefix="cc" Namespace="pruebas" Assembly="MiPrimerControl"
%>
<%@ Page language="c#" Codebehind="control.aspx.cs"
AutoEventWireup="false" Inherits="pruebas.control" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>control</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="
http://schemas.microsoft.com/intellisense/ie5"
;>
</HEAD>
<body MS_POSITIONING="GridLayout">
<cc:MiPrimerControl runat="server" id="MiPrimerControl1" />
</body>
</HTML>
lo he compilado con:
set outdir="c:\inetpub\wwwroot\daniel\pruebas\bin\MiPrimerControl.dll"
set assemblies=System.dll,System.Web.dll
csc /t:library /out:%outdir% /r:%assemblies% MiPrimerControl.cs
pero me sale el error que sigue, que podrĂa estar pasando??
----------------------------------------------------------------------------
--
Server Error in '/daniel/pruebas' Application.
----------------------------------------------------------------------------
--
Compilation Error
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific error
details and modify your source code appropriately.
Compiler Error Message: CS1595: 'pruebas.MiPrimercontrol' is defined in
multiple places; using definition from
'C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET
Files\daniel_pruebas\a7ac26a3\e99b3f4\assembly\dl\969dfbe8\108c94ae_6902c201
\pruebas.DLL'
Source Error:
Line 11: </HEAD>
Line 12: <body MS_POSITIONING="GridLayout">
Line 13: <cc:MiPrimerControl runat="server" id="MiPrimerControl1" />
Line 14: </body>
Line 15: </HTML>
Source File:
http://localhost/daniel/pruebas/control.aspx
Line: 13
Atte.
Daniel Chavez B
Tel: (511) 7409455
| [aspngcontrolscs] member
Click here to reveal e-mail address
= YOUR ID |
http://www.asplists.com/asplists/aspngcontrolscs.asp
= JOIN/QUIT |
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
System.Web.UI.HtmlTextWriter
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com