在freetextbox里 把图片保存到你指定的文件夹,然后插入数据库了

来源:百度知道 编辑:UC知道 时间:2024/06/15 02:30:11
如题~

在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);
}

用 ntko OFFICE 能实现