ERROR IN ADDING MEDIA PLAYER BY WEB MATRIX [Answered]RSS

4 replies

Last post Mar 21, 2011 06:02 AM by simtan

  • ERROR IN ADDING MEDIA PLAYER BY WEB MATRIX

    Mar 18, 2011 12:37 PM|kankit18|LINK

    HI,

    I get an compilation error when i try to add a media player to my Website with cshtml page

    The error msg is ' Compiler Error Message: CS1009: Unrecognized escape sequenc ' in the line

    Line 10:         path: "Media\sample.wmv"

    cshtml

  • Re: ERROR IN ADDING MEDIA PLAYER BY WEB MATRIX

    Mar 18, 2011 09:50 PM|simtan|LINK

    Hello,

     The "\" character escapes the next character in a string. To prevent that from happening, have it escape itself, like so:

    "Media\\sample.wmv"

    For other ASP.NET related questions, I would suggest checking out the ASP.NET forums. Hope this helps!

    Simon Tan
    Program Manager
    Web Platform and Tools
  • Re: ERROR IN ADDING MEDIA PLAYER BY WEB MATRIX

    Mar 19, 2011 01:57 AM|kankit18|LINK

    thnks......got it.....
  • Re: ERROR IN ADDING MEDIA PLAYER BY WEB MATRIX

    Mar 19, 2011 02:00 AM|kankit18|LINK

    Can u please tell me how to add the path to the media player dynamically for media files????

    cshtml

  • Re: ERROR IN ADDING MEDIA PLAYER BY WEB MATRIX

    Mar 21, 2011 06:02 AM|simtan|LINK

    Hello,

    You might want to try reading this tutorial for ASP.NET Web Pages, called "Working with Files":

    http://www.asp.net/webmatrix/tutorials/8-working-with-files

    You can generally refer to files inside your website by starting with Server.MapPath("~/FILE_PATH_HERE"); in your ASP.NET code. Hope that helps!

    Simon Tan
    Program Manager
    Web Platform and Tools