Response.Redirect可不可以重定向到一个流媒体文件?

NetFire 2003-01-22 11:24:49
我的做法——
Dim sql as string = "select links from Content where ContentID='" & Request.QueryString("Id") & "'"
Dim MyCmd As New SqlCommand(sql,Myconnection)
MyConnection.Open()
Dim MyDataReader As SqlDataReader = MyCmd.ExecuteReader()
Dim url as string
MyDataReader.Read()
url = MyDataReader.GetString(0)
Response.Redirect(url)
MyDataReader.Close()
MyConnection.Close()


好像不行,有没有其他办法?
...全文
43 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
saucer 2003-01-22
  • 打赏
  • 举报
回复
it works for me, :-), RealPlayer pops up

<%Response.Redirect("rtsp://210.41.247.100/news/zhlm/swpi.rm");%>
NetFire 2003-01-22
  • 打赏
  • 举报
回复
i sure

please try rtsp://210.41.247.100/news/zhlm/swpi.rm

if i write code as
Response.Redirect("rtsp://210.41.247.100/news/zhlm/swpi.rm")

then the page is nothing——The page cannot be displayed

why?
saucer 2003-01-22
  • 打赏
  • 举报
回复
Response.Redirect可以重定向到anything, make sure the 流媒体文件 url exists
NetFire 2003-01-22
  • 打赏
  • 举报
回复
我顶
NetFire 2003-01-22
  • 打赏
  • 举报
回复
问题找到,是我的iis有问题。结贴
NetFire 2003-01-22
  • 打赏
  • 举报
回复
up
NetFire 2003-01-22
  • 打赏
  • 举报
回复
再问saucer,我用编程的方法为什么不能实现呢?也就是说我这样做(其中流媒体文件地址从数据库中读出),怎么就实现不了呢??
代码如下——

<script runat="server" language="vb">
Sub Page_Load(Source As Object, E As EventArgs)
Dim MyConnection As SqlConnection = new SqlConnection("server=210.41.247.201;uid=anyone;PWD=205di214;DATABASE=elearning")
Dim sql as string = "select links from Content where ContentID='" & Request.QueryString("Id") & "'"
Dim MyCmd As New SqlCommand(sql,Myconnection)
MyConnection.Open()
Dim MyDataReader As SqlDataReader = MyCmd.ExecuteReader()
Dim url as string
MyDataReader.Read()
url = MyDataReader.GetString(0)
Response.Redirect(url)
MyDataReader.Close()
MyConnection.Close()
End Sub
</script>

62,243

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧