PHP beginner |
|
Ik heb nou dit:
default.aspx
<%@ Page Language="C#" Codebehind="default.aspx.cs" AutoEventWireup="false" Inherits="Test.WijzigTekst" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form id="main" method="post" runat="server">
<label id="test">Dit is een test label</label>
<input type="text" name="bericht">
<input type="button" name="postbericht">
</form>
</body>
</html>
<%@ Page Language="C#" Codebehind="default.aspx.cs" AutoEventWireup="false" Inherits="Test.WijzigTekst" %> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form id="main" method="post" runat="server"> <label id="test">Dit is een test label</label> <input type="text" name="bericht"> <input type="button" name="postbericht"> </form> </body> </html>
C# code
default.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;
namespace Test
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WijzigTekst : System.Web.UI.Page
{
private void postbericht_Click(object sender, System.EventArgs e)
{
label1.Text = bericht.Text;
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
using System.Web .SessionState ;using System.Web .UI .WebControls ;using System.Web .UI .HtmlControls ; namespace Test { /// <summary> /// Summary description for WebForm1. /// </summary> public class WijzigTekst : System.Web .UI .Page { private void postbericht_Click (object sender , System.EventArgs e ) { label1.Text = bericht.Text; } #region Web Form Designer generated code override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); } /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this .Load += new System.EventHandler (this .Page_Load ); } #endregion } }
En dan krijg ik een foutmelding namelijk:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
Server Error in '/' Application. -------------------------------------------------------------------------------- Runtime Error Description : An application error occurred on the server . The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons ). It could , however , be viewed by browsers running on the local server machine . Details : To enable the details of this specific error message to be viewable on remote machines , please create a <customErrors > tag within a "web.config" configuration file located in the root directory of the current web application . This <customErrors > tag should then have its "mode" attribute set to "Off". <!-- Web .Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </configuration> Notes : The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application 's <customErrors> configuration tag to point to a custom error page URL. <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration>
Wie weet wat ik fout doe?
Alvast bedankt,
groet,
Luuk |