locked
playing audio in asp.net RRS feed

  • Question

  • User1216627406 posted

    Greetings again.

    Is there a way that I can get this to work?

    On the markup, I have this:

    <td><a href="http://servername/Archives/" & folder.text & "/noose_" & build.text & ".wav">Listen</a></td>
    
    On codebehind,I am passing to value of folder and build:
    
    folder.Text = dr("folder").ToString()
    build.Text = dr("build").ToString()
    

    My <a href="""> is not recognizing folder.text and build.text

    Thank you for your help

    Monday, May 27, 2019 2:58 AM

Answers

  • User665608656 posted

    Hi simflex,

    According to your questions and the code you provided, I suggest that you could use <%=%> to accept text values.

    <%=%>  is short-hand for Response.Write (discussed here).

    For more details, you could refer to the following code:

    <a href='<%= "http://servername/Archives/"+ folder.Text+"/noose_"+build.Text+".wav" %>'>Listen</a>


    Best Regards,

    YongQing.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 27, 2019 8:21 AM

All replies

  • User665608656 posted

    Hi simflex,

    According to your questions and the code you provided, I suggest that you could use <%=%> to accept text values.

    <%=%>  is short-hand for Response.Write (discussed here).

    For more details, you could refer to the following code:

    <a href='<%= "http://servername/Archives/"+ folder.Text+"/noose_"+build.Text+".wav" %>'>Listen</a>


    Best Regards,

    YongQing.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 27, 2019 8:21 AM
  • User1216627406 posted

    Thank you very much.

    That worked perfectly.

    Monday, May 27, 2019 12:11 PM