2013-04-23 40 views
1

我有页面加载(VB)request.querystring,并希望使用查询字符串结果加载Flowplayer。我不知道如何从代码隐藏的查询字符串中获取值到流水游戏。有什么建议么?将视频从VB代码隐藏动态加载到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

你就应该能够通过使用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> 
拿到形式的查询字符串值