using WMA control from C# code

P

PiotreK

I've got an object (at the end of the post). Is it possible to pass an
URL to the object from C# code of the ASP.NET 2.0 with AJAX? I don't
want to set JScript events like OnClick with the command:

document.getElementById('Player').URL=

How to do it?

<object id="Player"
height="64"
classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6">
<param name="AutoStart" value="true" />
<param name="uiMode" value="full" />
</object>

PiotreK
 
P

PiotreK

Incorrect title. The correct would be: WMP, like Windows Media Player
control. Sorry.
 
B

bruce barker

ScriptManager.RegisterStartupScript(this,
this.GetType(),
"player",
"document.getElementById('Player').URL=' + url + "'",
true);

or

<object id="Player"
height="64"
classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6">
<param name="AutoStart" value="true" />
<param name="uiMode" value="full" />
<param name="URL" value="<%= PlayerURL%>" />
</object>
you coudl also use a lteral control to render the object tag at runtime.

-- bruce (sqlwork.com)
 
P

PiotreK

No good. I have AJAX website and ScriptManager.RegisterStartupScript
works synchronous... I've got i GridView with many lines and I want to
have many playbuttons in that Grid but I'm not sattisfied with adding
OnClick event - I want to control it with C# code. Simply calling an
asynchronous JavaScript line would be ok.

PiotreK
 
M

Mark Rae [MVP]

No good. I have AJAX website and ScriptManager.RegisterStartupScript
works synchronous... I've got i GridView with many lines and I want to
have many playbuttons in that Grid but I'm not sattisfied with adding
OnClick event - I want to control it with C# code. Simply calling an
asynchronous JavaScript line would be ok.

You mean something like this...?
http://www.sanctuaryrig.co.uk/sounds/default.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top