Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8683789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:08:04+00:00 2026-06-12T22:08:04+00:00

I want to embed Windows Media Player into my ASP.NET page. I do it

  • 0

I want to embed Windows Media Player into my ASP.NET page. I do it with this code, which works fine:

<OBJECT id='mediaPlayer1' width="180" height="50" 
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'>
<param name='fileName' value="http..">
<param name='animationatStart' value='true'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value="false">
<param name='showControls' value="true">
<param name ="ShowAudioControls"value="true">
<param name="ShowStatusBar" value="true">
<param name='loop' value="false">
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' 
bgcolor='darkblue' showcontrols="true" showtracker='-1' 
showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="420" height="380"
src="http..."    
autostart="true" designtimesp='5311' loop="false">
</EMBED>
</OBJECT>

My problem is, that I want to change the url in my code behind, (like here but it is in VB, not C#) because I load the Urls out of a database. So is there a way, where I can add this code in my c# part or -even better- to access the url from the c# part?

Sorry if this is a stupid question, but I searched for hours now.. and this.FindControl(mediaPlayer1); doesnt work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:08:06+00:00Added an answer on June 12, 2026 at 10:08 pm

    Override the Render method.
    Edit it to suite your requirements.

        protected override void Render(HtmlTextWriter writer)
        {
            StringBuilder stringBuilder = new StringBuilder("<OBJECT " 
                +"ID='" +this.ClientID + "' "
                + "name='" + this.ClientID + "' "
                +"CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'" 
                +"VIEWASTEXT"
                );
            stringBuilder.Append("<PARAM name='autostart' value='false'>");
            stringBuilder.Append("<PARAM name='autoplay' value='false'>");
    
            stringBuilder.Append("<PARAM name='URL' value='/" + fileUrl + "/" + selectedFile + "'>");
    
            stringBuilder.Append("<PARAM name='rate' value='1'>");
            stringBuilder.Append("<PARAM name='balance' value='0'>");
            stringBuilder.Append("<PARAM name='enabled' value='true'>");
            stringBuilder.Append("<PARAM name='enabledContextMenu' value='true'>");
            stringBuilder.Append("<PARAM name='fullScreen' value='false'>");
            stringBuilder.Append("<PARAM name='playCount' value='1'>");
            stringBuilder.Append("<PARAM name='volume' value='100'>");
            stringBuilder.Append("</OBJECT>");
    
            divWindowsMediaPlayer.InnerHtml = stringBuilder.ToString();
    
            base.Render(writer);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to embed windows media player in my own created web page. can
I've a swf file and i want to embed this file into HTML page
I want to embed a custom c# windows form (or WPF) user control into
I want to embed this gadget in my web page. That's why I use
I want to Embed SVG into XUL. I tried to use the this tutorial
I have this html code for embedding a video in an aspx page: <OBJECT
I'm trying to embed Windows-Sidebar-Widgets into my own .Net Application (WPF and C#), but
I have an iframe page at http://kuroato.com/apo/adplay.html and I want to embed this iframe
I want to embed a Flex application (i.e. a Flash SWF) into a PDF
I want to embed vimeo videos in my Vf page. I am trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.