我有页面加载(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>
答案 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>