Hi Aussie,
To set the media player's property from server-side code, you have two
options:
1) Declare a public property to return the video url:
public string VideoUrl
{
get
{
return "http://localhost/1.avi";
}
}
Then modify the WebForm:
<object id=msnVwmp class=msnVa
classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 style="width:
141px;
height: 141px">
<param name=uiMode value=full>
<param name=enableContextMenu value=false>
<param name=stretchToFit value=false>
<param name=windowlessvideo value=false>
<param name=url value="<%= VideoUrl %>">
</object>
This way, the generated media player's declaration will get updated url
property value from server-side code.
2) Register a startup javascript function to control the media player:
protected void Button1_Click(object sender, EventArgs e)
{
ClientScript.RegisterStartupScript(GetType(), "mp",
"form1.msnVwmp.url='http://mysite/1.avi';", true);
}
Hope this helps. Please feel free to post here if anything is unclear.
Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.