473,395 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Setting properties dynamically for an embedded video

I have an aspx page which embeds a video. Based on an input parameter
id, the appropriate video is played.

I've hard coded most the of "<object>" and "<embed"> paramters in the
HTML. However, the video source needs to be read and populated based on
database content..

How can I do this? My HTML is something like this .

<OBJECT blah blah>
<PARAM NAME="SRC" VALUE="VIDEO URL GOES HERE"
<EMBED blah blah SRC="VIDEO URL GOES HERE">
</EMBED>
</OBJECT>
I need my aspx code to insert the Video URL in the appropriate places.

Nov 19 '05 #1
1 1708
Hi!

An easy way is to add a Literal control to the location where you want to
embed the markup and then build the markup in code. You have a lot of
control over it that way. Here's the idea:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim sbObjectTag As New System.Text.StringBuilder
Dim strURL As String
strURL = "http://www.myplace.ca"
sbObjectTag.Append("<OBJECT blah blah>")
sbObjectTag.Append("<PARAM NAME='SRC' ")
sbObjectTag.Append("VALUE='")
sbObjectTag.Append(strURL)
sbObjectTag.Append("' <EMBED blah blah SRC=")
sbObjectTag.Append(strURL)
sbObjectTag.Append("' </EMBED></OBJECT>")
Literal1.Text = sbObjectTag.ToString
End Sub

<form id="Form1" method="post" runat="server">
<asp:literal id="Literal1" runat="server"></asp:literal>
</form>

Does this help?

Ken
Microsoft MVP [ASP.NET]
Toronto

<b_*****@yahoo.ca> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
I have an aspx page which embeds a video. Based on an input parameter
id, the appropriate video is played.

I've hard coded most the of "<object>" and "<embed"> paramters in the
HTML. However, the video source needs to be read and populated based on
database content..

How can I do this? My HTML is something like this .

<OBJECT blah blah>
<PARAM NAME="SRC" VALUE="VIDEO URL GOES HERE"
<EMBED blah blah SRC="VIDEO URL GOES HERE">
</EMBED>
</OBJECT>
I need my aspx code to insert the Video URL in the appropriate places.


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Paul | last post by:
Hello, I've been reading up on security in Java Applets and whilst I understand the concept, I can't successfully get my applet to read a file on my local machine. I discovered from...
5
by: Sean Berry | last post by:
I have a news video that I am sending out for a client. There are embedded links to flash movies in the email. I want the popup to be a set size (400 x 400). I am currently using the...
2
by: maflatoun | last post by:
Hi everyone, I have the following web user control. I like to set the properties dynamically without using page.databind. <uc1:partnerdownloads id="Partnerdownloads1" PropDomain="<%= Domain...
6
by: | last post by:
I have made some user controls with custom properties. I can set those properties on instances of my user controls, and I have programmed my user control to do useful visual things in response to...
1
by: DILA | last post by:
Hi, I have included an embedded Real Player and an embedded Quick Time Player for streaming videos, in my web pages. I'm interested in searching for a method or a script to disable the...
3
by: homec | last post by:
Hi, I have included an embedded Real Player and an embedded Quick Time Player for streaming videos, in my web pages. I'm interested in searching for a method or a script to disable the ...
6
by: xhunter | last post by:
I have this problem on my website and no matter what I have not been able to get over it, it is really getting on my nervers. it's a problem that only exists in non IE browsers. the frame work...
1
by: josephChiaWY | last post by:
Hi all, Recently, i have met a problem in playing the selected video in the embedded quicktime player. I am creating a video gallery for people to view their .mov file on quicktime player. Below...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.