2个回答
展开全部
在FreeTextBox的Load中,设定上传路径.
如此,图片就可以传到指定文件夹下.
protected void txt_FreeTextBox_Load(object sender, EventArgs e)
{
string str = "abc";//用户名,可选用变量
string path = "~/uploads/Users/" + str + ""; //指定目录
string fullPath = Server.MapPath("~/uploads/Users/") + str;
if (!Directory.Exists(fullPath))
{
Directory.CreateDirectory(fullPath);
}
txt_FreeTextBox.ImageGalleryPath = path; //指定上传路径
//Editor1.SetSecurityGalleryPath(path);
}
如此,图片就可以传到指定文件夹下.
protected void txt_FreeTextBox_Load(object sender, EventArgs e)
{
string str = "abc";//用户名,可选用变量
string path = "~/uploads/Users/" + str + ""; //指定目录
string fullPath = Server.MapPath("~/uploads/Users/") + str;
if (!Directory.Exists(fullPath))
{
Directory.CreateDirectory(fullPath);
}
txt_FreeTextBox.ImageGalleryPath = path; //指定上传路径
//Editor1.SetSecurityGalleryPath(path);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询