我的test.aspx页面要输出一个xml格式的文件,但后缀应该是wsx。Utils.MediaMgr mgr = new MediaPortal.Utils.MediaMgr();
Response.ContentType="text/xml";
Response.Charset = "GB2312";
string t = mgr.BuildWsxFile("1","1","racecar_100.wmv");
Response.Write();可是这么写,并不能指定为wsx格式,mediaplay无法播放。
<js>   WindowsMediaPlayer.URL = "http://localhost/PukkaMediaCenter/MediaPortal/test.aspx";

解决方案 »

  1.   

    不好意思,写错了  Response.Write(t);大侠快来帮忙啊!接分啦~~~
      

  2.   

    可以用 substring () 和 lastIndexof()
    截取后缀名为你想要的格式。
      

  3.   

    对,是少写了一个Response.End();不过不是解决问题的关键,主要是Response.ContentType ,具体的MIME类型是什么才能输出wsx文件~~谢谢大家!
      

  4.   

    好了好了,发现这种问题无法很好解决,只好换成asx文件了~~~Response.ContentType=“video/x-ms-asf”;结咯~~散分~~~