How to create a ASPX file after clicking a button on another form

风流意气都作罢 提交于 2020-01-06 05:35:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!