1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Embedding song in ASP page?

Discussion in 'C#' started by dhavalcoholic, Sep 28, 2009.

  1. #1
    Hello friends,

    I am trying to embed Windows Media Player in my ASP page.

    I am using the following code to do so.

    <embed type="application/x-mplayer2" name="wmp1" ShowStatusBar="true" EnableContextMenu="true" autostart="true" loop="false" src='<% rs.field("Link") %>'/>
    Code (markup):

    The problem is..... the song doesnt get played after I embed it this way.

    Can any one suggest me any solution?

    I check out the connectivity coding, its perfectly fine & the link is getting retrieved properly.


    Please Help.
     
    dhavalcoholic, Sep 28, 2009 IP
  2. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    The link is getting retrieved properly?
    have you tried changing:
    <% rs.field("Link") %>
    to
    <%= rs.field("Link") %>

    To evaluate the expression i think you need to add the = sign, or it will do nothing. Or:
    <% Response.Write rs.Field("Link") %>
     
    camjohnson95, Sep 28, 2009 IP
  3. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #3
    camjohnson95, Sep 28, 2009 IP
  4. dhavalcoholic

    dhavalcoholic Member

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    38
    #4
    @camjohnson95


    Thanks a lot.

    I missed that " = " there. It is working perfectly now :)

    I am new to ASP..... and am learning it all on my own. So there are such simple things I am unaware of :(

    Thank you very much. :)

    Have a good day! :)
     
    dhavalcoholic, Sep 28, 2009 IP
  5. rkstech

    rkstech Active Member

    Messages:
    195
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #5
    Very easy

    Your server should support this MIME type and make sure the URL for the music is correct
     
    rkstech, Sep 30, 2009 IP
  6. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #6
    you could embed a flash player - then have a true streaming audio file if you are looking for a cleaner/more compliant/faster loading scenario
     
    ccoonen, Sep 30, 2009 IP
  7. Voynex

    Voynex Peon

    Messages:
    31
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Looks like the problem is solved already.
     
    Voynex, May 19, 2011 IP
  8. unknownpray

    unknownpray Active Member

    Messages:
    3,831
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    70
    #8
    unknownpray, Jun 25, 2011 IP