问题
Hopefully this is clear enough, i have this bit of code :
private void BtnAdd_ServerClick(object sender, EventArgs e)
{
var path = @"C:\Users\User\Desktop\Demo\Demo\" + BtnName.Value;
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
}
That creates a folder named after the value of a text box, and i need to know if there's a way to create an aspx file the same way, and save it in one of those folders or anywhere it just needs to be accessible to the project, thanks in advance! I'm open to any questions or code updates.
来源:https://stackoverflow.com/questions/58962653/how-to-create-a-aspx-file-after-clicking-a-button-on-another-form