Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Dynamic music player....

Dynamic music player....

Scheduled Pinned Locked Moved ASP.NET
help
18 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Abhishek Sur

    hey.. dont write in response using Response.Write... Its not good. Rather place the object tag in the designer and handle from codebehind. Also if you write Respons.write("<object width... It will show you <object. Rather than using < use < itself so that browser renders the html. Now it is no big deal if you are using masterpage or not. Just in your codebehind if you want to add some reference to parameter to a serverside control, add control.ClientId rather than control.Id. hope you can do it now. :)

    Abhishek Sur


    My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

    **Don't forget to click "Good Answer" if you like to.

    G Offline
    G Offline
    greendragons
    wrote on last edited by
    #9

    coz it's object Tag means html one...not asp so how to add control id property....

    C 1 Reply Last reply
    0
    • G greendragons

      coz it's object Tag means html one...not asp so how to add control id property....

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #10

      Here are your issues. You're trying to create some sort of pirate music site. Which I expect is for your own use, which makes me think that you're trying to pick up a bare minimum of knowledge in order to achieve it. We're not going to write all the code for you. There is no reason for the master page to make any difference. The query string is visible everywhere. In fact, your best bet, IMO, is to set up the player inside your aspx, and have some server tags which cause it to render the right properties from a code behind property, which in turn reads the query string.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      G 1 Reply Last reply
      0
      • C Christian Graus

        Here are your issues. You're trying to create some sort of pirate music site. Which I expect is for your own use, which makes me think that you're trying to pick up a bare minimum of knowledge in order to achieve it. We're not going to write all the code for you. There is no reason for the master page to make any difference. The query string is visible everywhere. In fact, your best bet, IMO, is to set up the player inside your aspx, and have some server tags which cause it to render the right properties from a code behind property, which in turn reads the query string.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        G Offline
        G Offline
        greendragons
        wrote on last edited by
        #11

        what????? Im making site for my college project.....and yeah i don't know much about adding literal controls....coz i hardly use html controls instead i prefer asp controls and i also could have used mediaplayer toolkit but it's trail i have so wanted to do with html code......???????????

        C 1 Reply Last reply
        0
        • G greendragons

          what????? Im making site for my college project.....and yeah i don't know much about adding literal controls....coz i hardly use html controls instead i prefer asp controls and i also could have used mediaplayer toolkit but it's trail i have so wanted to do with html code......???????????

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #12

          Well, you went all quiet when I asked if it was legal. I appear to be spot on. This is your college project, we've explained exactly how to do it. If you're stuck, post specific code and explain why you';re still stuck. Don't just ask us for code, if you're in college, you can surely understand the explanations we've given ?

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          G 1 Reply Last reply
          0
          • C Christian Graus

            Well, you went all quiet when I asked if it was legal. I appear to be spot on. This is your college project, we've explained exactly how to do it. If you're stuck, post specific code and explain why you';re still stuck. Don't just ask us for code, if you're in college, you can surely understand the explanations we've given ?

            Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

            G Offline
            G Offline
            greendragons
            wrote on last edited by
            #13

            protected void Page_Load(object sender, EventArgs e)       {             image1.AlternateText = Request.QueryString["art"];             image1.ImageUrl = Request.QueryString["imgg"];             label2.Text = image1.AlternateText;             string loc = Request.QueryString["u"];             Panel1.Controls.Add(new LiteralControl("<OBJECT width=312px height=248px CLASSID=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 VIEWASTEXT >"));             Panel1.Controls.Add(new LiteralControl("<PARAM name=autoStart value=False>"));             Panel1.Controls.Add(new LiteralControl(@"<PARAM name=URL value="+loc+">"));             Panel1.Controls.Add(new LiteralControl("</OBJECT>"));       } i got it....actually i was using Response.Write what actually showing controls in browsers but not master page contents....now using this literalcontrols i did but still problem is that it's not playing the song....n my url is perfectly right........

            G C 2 Replies Last reply
            0
            • G greendragons

              protected void Page_Load(object sender, EventArgs e)       {             image1.AlternateText = Request.QueryString["art"];             image1.ImageUrl = Request.QueryString["imgg"];             label2.Text = image1.AlternateText;             string loc = Request.QueryString["u"];             Panel1.Controls.Add(new LiteralControl("<OBJECT width=312px height=248px CLASSID=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 VIEWASTEXT >"));             Panel1.Controls.Add(new LiteralControl("<PARAM name=autoStart value=False>"));             Panel1.Controls.Add(new LiteralControl(@"<PARAM name=URL value="+loc+">"));             Panel1.Controls.Add(new LiteralControl("</OBJECT>"));       } i got it....actually i was using Response.Write what actually showing controls in browsers but not master page contents....now using this literalcontrols i did but still problem is that it's not playing the song....n my url is perfectly right........

              G Offline
              G Offline
              greendragons
              wrote on last edited by
              #14

              even i checked still not playing...is it coz im using literalcontrols.....and when im using this code in source it's playing perfectly well Panel1.Controls.Add(new LiteralControl("<OBJECT width=312px height=248px CLASSID=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 VIEWASTEXT >"));             Panel1.Controls.Add(new LiteralControl("<PARAM name=autoStart value=False>"));             Panel1.Controls.Add(new LiteralControl(@"<PARAM name=URL value=F:\Songs\Britney Spears\Circus-2008\01   Britney Spears - Womanizer.mp3>"));             Panel1.Controls.Add(new LiteralControl("</OBJECT>"));

              1 Reply Last reply
              0
              • G greendragons

                protected void Page_Load(object sender, EventArgs e)       {             image1.AlternateText = Request.QueryString["art"];             image1.ImageUrl = Request.QueryString["imgg"];             label2.Text = image1.AlternateText;             string loc = Request.QueryString["u"];             Panel1.Controls.Add(new LiteralControl("<OBJECT width=312px height=248px CLASSID=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 VIEWASTEXT >"));             Panel1.Controls.Add(new LiteralControl("<PARAM name=autoStart value=False>"));             Panel1.Controls.Add(new LiteralControl(@"<PARAM name=URL value="+loc+">"));             Panel1.Controls.Add(new LiteralControl("</OBJECT>"));       } i got it....actually i was using Response.Write what actually showing controls in browsers but not master page contents....now using this literalcontrols i did but still problem is that it's not playing the song....n my url is perfectly right........

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #15

                greendragons wrote:

                Panel1.Controls.Add(new LiteralControl(""));             Panel1.Controls.Add(new LiteralControl(""));             Panel1.Controls.Add(new LiteralControl(@""));             Panel1.Controls.Add(new LiteralControl(""));

                Create a literal on the page, then build a string, and assign that string to the one literal. It's neater. Does your URL have spaces ? Should it be in quotes ?

                Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                G 1 Reply Last reply
                0
                • C Christian Graus

                  greendragons wrote:

                  Panel1.Controls.Add(new LiteralControl(""));             Panel1.Controls.Add(new LiteralControl(""));             Panel1.Controls.Add(new LiteralControl(@""));             Panel1.Controls.Add(new LiteralControl(""));

                  Create a literal on the page, then build a string, and assign that string to the one literal. It's neater. Does your URL have spaces ? Should it be in quotes ?

                  Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                  G Offline
                  G Offline
                  greendragons
                  wrote on last edited by
                  #16

                  Yes did that but i wanna include location value in quotes unless it won't play....but if i'll put quotes in between it will terminate the string....how to include quotes......

                  C 1 Reply Last reply
                  0
                  • G greendragons

                    Yes did that but i wanna include location value in quotes unless it won't play....but if i'll put quotes in between it will terminate the string....how to include quotes......

                    C Offline
                    C Offline
                    Christian Graus
                    wrote on last edited by
                    #17

                    Add \" to encode a double quote, or single quotes if you can.

                    Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                    G 1 Reply Last reply
                    0
                    • C Christian Graus

                      Add \" to encode a double quote, or single quotes if you can.

                      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                      G Offline
                      G Offline
                      greendragons
                      wrote on last edited by
                      #18

                      Thnx alot.....

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups