• 全部
  • .NET Framework
  • ASP
  • Web Services
  • .NET互联网桌面应用
  • VB
  • 图表区
  • 分析与设计
  • 组件/控件开发
  • AppLauncher
  • 问答

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()


好像不行,有没有其他办法?
...全文
8 点赞 收藏 7
写回复
7 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
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>
回复
发帖
.NET技术社区
创建于2007-09-28

5.8w+

社区成员

.NET技术交流专区
申请成为版主
帖子事件
创建了帖子
2003-01-22 11:24
社区公告
暂无公告