2005-10-31, 05:41 PM
I want to change alittle in Download.aspx.cs
private void Page_Load(object sender, System.EventArgs e)
but nothing happens
more exactly I want to send a .wpl file instead:
code:
Response.AddHeader("Content-Type", "video/x-ms-wmp");
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + Path.GetFileNameWithoutExtension(fileName) + ".wpl\"");
// Response.AddHeader("Content-Type", "audio/mpegurl");
// Response.AddHeader("Content-Disposition", "attachment; filename=\"" + Path.GetFileNameWithoutExtension(fileName) + ".m3u\"");
// Response.Write("#EXTM3U\r\n");
// Response.Write("#EXTINF:" + seconds + "," + Path.GetFileNameWithoutExtension(fileName) + "\r\n");
//mintest
Response.Write("<?wpl version=\"1.0\"?>\r\n");
Response.Write("<smil>\r\n");
Response.Write(" <head>\r\n");
Response.Write(" <meta name=\"Generator\" content=\"Microsoft Windows Media Player -- 10.0.0.3802\"/>\r\n");
Response.Write(" <author/>\r\n");
Response.Write(" <title>"+Path.GetFileNameWithoutExtension(fileName)+"</title>\r\n");
Response.Write(" </head>\r\n");
Response.Write(" <body>\r\n");
Response.Write(" <seq>\r\n");
string url = Request.Url.ToString().Replace(
Request.Url.Scheme + Uri.SchemeDelimiter + Request.Url.Authority,
Request.Url.Scheme + Uri.SchemeDelimiter + Request.Headers["Host"]);
Response.Write(url + "&mode=1\r\n");
//mintest
Response.Write(" <media src=\""+ url +"/>\r\n");
Response.Write(" </seq>\r\n");
Response.Write(" </body>\r\n");
Response.Write("</smil>\r\n");
but it still sends m3u files, do I have to somehow compile the .cs file before it is used? I couldnt open the csproj file in VS.net it said something about it cant find the server or something.. but I can view the webmin in IE ...
Please help!
private void Page_Load(object sender, System.EventArgs e)
but nothing happens
more exactly I want to send a .wpl file instead:
code:
Response.AddHeader("Content-Type", "video/x-ms-wmp");
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + Path.GetFileNameWithoutExtension(fileName) + ".wpl\"");
// Response.AddHeader("Content-Type", "audio/mpegurl");
// Response.AddHeader("Content-Disposition", "attachment; filename=\"" + Path.GetFileNameWithoutExtension(fileName) + ".m3u\"");
// Response.Write("#EXTM3U\r\n");
// Response.Write("#EXTINF:" + seconds + "," + Path.GetFileNameWithoutExtension(fileName) + "\r\n");
//mintest
Response.Write("<?wpl version=\"1.0\"?>\r\n");
Response.Write("<smil>\r\n");
Response.Write(" <head>\r\n");
Response.Write(" <meta name=\"Generator\" content=\"Microsoft Windows Media Player -- 10.0.0.3802\"/>\r\n");
Response.Write(" <author/>\r\n");
Response.Write(" <title>"+Path.GetFileNameWithoutExtension(fileName)+"</title>\r\n");
Response.Write(" </head>\r\n");
Response.Write(" <body>\r\n");
Response.Write(" <seq>\r\n");
string url = Request.Url.ToString().Replace(
Request.Url.Scheme + Uri.SchemeDelimiter + Request.Url.Authority,
Request.Url.Scheme + Uri.SchemeDelimiter + Request.Headers["Host"]);
Response.Write(url + "&mode=1\r\n");
//mintest
Response.Write(" <media src=\""+ url +"/>\r\n");
Response.Write(" </seq>\r\n");
Response.Write(" </body>\r\n");
Response.Write("</smil>\r\n");
but it still sends m3u files, do I have to somehow compile the .cs file before it is used? I couldnt open the csproj file in VS.net it said something about it cant find the server or something.. but I can view the webmin in IE ...
Please help!