En Side som ikke virker
<%@ Page language="c#" Codebehind="Success.aspx.cs" AutoEventWireup="false" Inherits="MoensVandrehjem.Success" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Success</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<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">
<form id="Form1" method="post" runat="server">
<asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 264px; POSITION: absolute; TOP: 168px" runat="server"></asp:Label>
</form>
</body>
</HTML>
------------------------------------------------------------------------------
C# kode
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 MoensVandrehjem
{
/// <summary>
/// Summary description for Success.
/// </summary>
public class Success : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label1;
private void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
{
if (Request.QueryString.HasKeys())
{
if (Request.QueryString[0] == "ADD")
{
this.Label1.Text = "Siden tilføjet";
}
else if (Request.QueryString[0] == "DELETE")
{
this.Label1.Text = "Siden slettet";
}
else if(Request.QueryString[0] == "UPDATE")
{
this.Label1.Text = "Siden Opdateret";
}
}
}
}
#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
}
}