I have a WebForms-Site which is located in a Directory (e.g. /View/site.aspx).
In this site I made an asp:Button with an onClick-Event. The idea is, that if this button is clicked, data which was beforehand written into TextBoxes should be saved.
The problem is that if this Button is clicked, it simply rediricts to a not existing site (/site.aspx - ignoring the directory /View).
I simply tragged the button from the Toolbar, so there should be no error in the code. Button1_Click was generated by double clicking the button in the design window and is not called.
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
Thank you!
Edit: As requested, here is Button1_Click. As I said, it is not called.
protected void Button1_Click(object sender, EventArgs e)
{
//I deleted the saving-part, makes no difference.
Console.Write("Button 1 clicked!");
}