1

我有页面加载(VB)request.querystring,并希望使用查询字符串结果加载 Flowplayer。我不知道如何从代码隐藏中的查询字符串中获取值到 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>
4

1 回答 1

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>
于 2013-05-03T12:02:08.953 回答