从VB代码隐藏中将视频动态加载到Flowplayer中

时间:2013-04-23 03:49:53

标签: c# asp.net vb.net flowplayer

我有页面加载(VB)request.querystring并希望使用查询字符串结果加载Flowplayer。我不知道如何从代码隐藏中的查询字符串获取值到流程播放器。有什么建议吗?

Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
    Dim videoName As String = Request.QueryString("FileName")
    Dim thumb As String = Request.QueryString("Thumb")
End Sub

<div data-swf="http://mywebsite.com/player/flowplayer.swf" class="flowplayer play-button"
  data-ratio="0.416" data-embed="false">
  <video poster="NEED QUERYSTRING 'THUMB' VALUE HERE">         
     <source type="video/mp4" src="NEED 'VIDEONAME' VALUE HERE"/>         
  </video>      
</div>

1 个答案:

答案 0 :(得分:1)

您应该能够使用Page.Request.QueryString

获取表单中的查询字符串值

示例

<div data-swf="http://mywebsite.com/player/flowplayer.swf" class="flowplayer play-button"
  data-ratio="0.416" data-embed="false">
  <video poster="<% Page.Request.QueryString['Thumb'] %>">         
     <source type="video/mp4" src="<% Page.Request.QueryString['FileName'] %>"/>         
  </video>      
</div>