I'm new to asp.net so wondering if someone can please show me how to use a dynamic variable in an asp.net page to set the value within <param name="" value="">
Thanks
2 Replies - 2932 Views - Last Post: 10 March 2010 - 08:23 AM
#1
Using asp.net to assign dynamic values to <param value>
Posted 09 March 2010 - 05:17 PM
Replies To: Using asp.net to assign dynamic values to <param value>
#2
Re: Using asp.net to assign dynamic values to <param value>
Posted 10 March 2010 - 08:09 AM
I am not quite understanding what you are trying to do. What are you trying to accomplish?
-zd
-zd
#3
Re: Using asp.net to assign dynamic values to <param value>
Posted 10 March 2010 - 08:23 AM
zdavis, on 10 March 2010 - 07:09 AM, said:
I am not quite understanding what you are trying to do. What are you trying to accomplish?
-zd
-zd
sorry I haven't explained myself very well. on the load of the webpage i have a vb function that grabs the querystring that holds the path to the video, which will change values each time it's loaded. I need then to be able to use that string to set the path to the video file that is to be used by the embedded media player.
this is where I get the file path and assign it to the variable vid
<script runat="server"> Dim vid, ext As String Sub page_load() vid = Request.QueryString("title") ext = vid.Substring(vid.Length - 3, 3) If ext.ToLower.Equals("mp4") Then Else Response.Redirect(vid) End If End Sub </script>
I then need to be able to use it in the html body
<object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="400" height="400"> <param name="fileName" value="vid"> <param name="animationatStart" value="true"> <param name="transparentatStart" value="true"> <param name="autoStart" value="true"> <param name="showControls" value="true"> <param name="Volume" value="-450"> <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="vid" name="MediaPlayer1" width="400" height="400" autostart="1" showcontrols="1" volume=-450> </object>
so I need to use vid = Request.QueryString("title") to set the value of <param name="fileName" value="vid">
Page 1 of 1