|
Finally found the reason, but I just don’t understand why this happens! If anyone knows, just say it~~
Button event code in login control:
protected void LoginButton_Click(object sender, EventArgs e)
{
try
{
this.Response.Redirect("~/Default2.aspx", false);
}
catch
{
}
}
When the page jumps, an ASPNETDB.MDF database will be automatically generated after refreshing the project directory. But if the try-catch block in the code is removed:
protected void LoginButton_Click(object sender, EventArgs e)
{
this.Response.Redirect("~/Default2.aspx");
}
In this way, the ASPNETDB.MDF database will not be automatically generated, why is this??? |
|