I'm trying to do a simple web form with asp.net & C# but althoug the page is
correctly compilated, when i load the page there is the following error
message:
System.Web.HttpException: External component has thrown an exception --->
System.Web.HttpCompileException: Eccezione lanciata da un componente
esterno. at
System.Web.Compilation.BaseCompiler.ThrowIfCompile rErrors(CompilerResults
results, CodeDomProvider codeProvider, CodeCompileUnit sourceData, String
sourceFile, String sourceString) at
System.Web.Compilation.BaseCompiler.GetCompiledTyp e() at
System.Web.UI.PageParser.CompileIntoType() at
System.Web.UI.TemplateParser.GetParserCacheItemThr oughCompilation--- End of
inner exception stack trace --- at
System.Web.UI.TemplateParser.GetParserCacheItemInt ernal(Boolean
fCreateIfNotFound) at
System.Web.UI.TemplateParser.GetParserCacheItemWit hNewConfigPath() at
System.Web.UI.TemplateParser.GetParserCacheItem() at
System.Web.UI.TemplateControlParser.CompileAndGetP arserCacheItem(String
virtualPath, String inputFile, HttpContext context) at
System.Web.UI.TemplateControlParser.GetCompiledIns tance(String virtualPath,
String inputFile, HttpContext context) at
System.Web.UI.PageParser.GetCompiledPageInstance(S tring virtualPath, String
inputFile, HttpContext context) at
System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context, String
requestType, String url, String path) at
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig) at
System.Web.MapHandlerExecutionStep.Execute() at
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously
The code is quite simple...
/modules/users/account/OptionsAdmin.aspx
<%@ Page language="c#" Codebehind="OptionsAdmin.aspx.cs"
AutoEventWireup="false" Inherits="Univ.WebModules.Accounts.Web.OptionsAdmi n"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>OptionsAdmin</title>
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<LINK href="../../Styles/Navigator.css" rel="stylesheet">
<LINK href="../../Styles/ThePhile.css" rel="stylesheet">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="OptionsAdmin" method="post" runat="server">
<asp:LinkButton ID="FIleManager" Runat="server"> Browse File
</asp:LinkButton><br>
<asp:button ID="ManagePermissions" Runat="server" Text="Manage
Permission"></asp:button>
</form>
</body>
</HTML>
/module/users/account/OptionsAdmin.aspx.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Univ.WebModules.Accounts.Business;
namespace Univ.WebModules.Accounts.Web
{
public class OptionsAdmin : Univ.ThePhile.Web.UnivPage
{
protected System.Web.UI.WebControls.Button ManagePermissions;
protected System.Web.UI.WebControls.LinkButton FileManager;
private void Page_Load(object sender, System.EventArgs e)
{
Hello
}
private void FileManager_Click(object sender, System.EventArgs e)
{
Server.Transfer("/modules/filemanager/browsefile.aspx");
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
(If i don't put the web controls in the form the page is load correctly)
Could Anyone help me?