I made an ASP.NET application using Notepad ++. For this exercise, I do not want to use Visual Studio or any other tool. I want to understand this process.
I created my site and it works fine and everything works fine.
Now I want to add C # code per page, both for the main page and for individual pages.
So far, I have a file called Home.aspx , and I want to add a C # file to it.
I've created a file named Home.aspx.cs . The following is the full contents of the file:
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("LOAD");
Response.End();
}
But when the page loads, this file does not load. Obviously, I'm missing something, but I'm not sure what. Perhaps a link in my web.config or some other folder or language link to tell the page that it is C #, or something to report a Page_Load error?
In addition, I want to do the same for my main page, which is currently called masterPage.master .
So, I would make a file called masterPage.master.cs , or is it a completely different way, or can this even be done?
All references to this problem explain how to do this in Visual Studio, which I do not want to use.
source
share