as it says, when I run my application in debug the code-behind isn’t being called.
I had this problem to start with and managed to get around it by abandoning the page I was working on and starting a completely new one.
However it seems this one has now broken also!
Basically it just opens showing the unaltered HTML without running any of the C# code and without hitting any breakpoints.
It builds ok but I haven’t tried deploying it yet as I don’t have a server available at the moment.
This is my code behind from index.aspx.cs:
namespace PAPS
{
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string username = User.Identity.Name;
// check security
Security security = new Security(username);
divUsername.InnerText = username;
security = null;
}
}
}
The page declaration from index.aspx is as follows:
<%@ Page Language="C#" AutoEventWireup="false" EnableSessionState="True" EnableViewState="false" CodeBehind="index.aspx.cs" Inherits="PAPS.index" %>
Anyone have any useful suggestions?
Thanks
You have
Unless you’re handling the events yourself, try setting that to true.