在查询的时候
url=replace(字段,'/','~')

解决方案 »

  1.   

    是这样加吗  /~   好像还是不好使!!进入数据库的还是/\pictures 不是~\pictures
      

  2.   

    declare @s varchar(50)
    set @s='/\pictures'
    select replace(@s,'/','~')/*
    ~\pictures(所影响的行数为 1 行)*/
      

  3.   

    int intExt = fileName.LastIndexOf("."); 
    string strExt = fileName.Substring(intExt); 
    string strNewName = DateTime.Now.ToString("yyyyMMddhhmm").ToString() + upFile.PostedFile.ContentLength.ToString() + strExt;
    string path=Request.PhysicalApplicationPath+Label3.Text+"/"+strNewName;
    upFile.PostedFile.SaveAs(path); 
    Label4.Text=Label3.Text+"/"+strNewName;