.NETGURU
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




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification