通过 ashx 打开图片,然后在其他页面 Response.Redirect("Handler1.ashx?ID=3112332356")但打开的页面的标题是文件 Handler1.ashx 的 URL,请问如何设置这个标题呢?谢谢!!!!

解决方案 »

  1.   

    context.Response.Write("<title></title>");  这样行不???
    只是猜想。没尝试
      

  2.   

    http://msdn.microsoft.com/zh-cn/library/system.web.ihttphandler.processrequest(VS.80).aspx
      

  3.   

    Handler1.ashx  输出图片不是用context.Response.Write()?
    context.Response.ContentType 指定下这个应该可以的啊。
      

  4.   


    context.Response.Write("<script language=javascript>document.title='标题'</script>");
    这样可以,但前提是ContentType不能设置成其他的,如"text/HTML"、"image/JPEG"之类的。
      

  5.   

    context.Response.Write("<html><head><title>标题</title></head><body>";
      

  6.   


    你试试没没有,你就这么断定?
    <title>标题</title>是正确的写法。其他js的写法的本质就是这样的。
      

  7.   

    另外,你要知道为什么会有ashx和aspx2种技术,并正确理解2者的适用场合