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 6000765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:44:27+00:00 2026-05-23T00:44:27+00:00

I am developing an MVC3 application using C# and Razor . I have a

  • 0

I am developing an MVC3 application using C# and Razor. I have a problem when I need to display one the Play View.

The Play action method is used to retrieve a path of a FLV (Flash) file to be then passed to the Play View to reproduce the file.
When I use return View("Play") the application renders the View correctly. However I need to pass the path variable to the View as shown in the code. When I do it I receive the following message:

The view ‘Play’ or its master was not found or no view engine supports the searched locations

Here is the Action Method:

public ActionResult Play(int topicId)
{
var ltopicDownloadLink = _webinarService.FindTopicDownloadLink(topicId);

if (ltopicDownloadLink != null)
{
    var path = Server.MapPath("~/App_Data/WebinarRecordings/" + ltopicDownloadLink);
    var file = new FileInfo(path);
    if (file.Exists)
    {
        return View("Play", path);
    }
}

return RedirectToAction("Index");
}

Here is the Play View:

@model System.String

<div id='player'>This div will be replaced by the JW Player.</div>

<script type='text/javascript' src='/FLV Player/jwplayer.js'></script>

<script type='text/javascript'>

   var filepath = @Html.Raw(Json.Encode(Model));

   jwplayer('player').setup({
   'flashplayer':'/FLV Player/player.swf',
   'width': '400',
   'height': '300',
   'file': filepath
   });
</script>

My only hint is that I make some mistake in using the model in the javascript. May you please help me?

Thanks

  • 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-05-23T00:44:28+00:00Added an answer on May 23, 2026 at 12:44 am

    You are invoking a wrong overload. Here’s the correct overload:

    return View("Play", (object)path);
    

    or you could also declare the path variable as object:

    object path = Server.MapPath("~/App_Data/WebinarRecordings/" + ltopicDownloadLink);
    

    and then

    return View("Play", path);
    

    will also work:

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an ASP.NET MVC3 application using the new Razor view engine but I'm
Developing iphone application using makkit framework. I have got the map view integrated in
I am developing an MVC3 application using Visual Studio 2010. I have an aspx
we are developing a web application using MVC3 and VS2010. We have some pdf
we are developing a web application using MVC3 and Jquery. we have a situation
I have been developing an application in asp.net mvc3. We have used models to
I am developing one new area of a fairly large web application using MVC3
I am developing an ASP.NET MVC 3 application using C# and Razor. I have
I'm developing a MVC3 application which interacts with a db. I'm using a form
I'm using MVC2 and VS2010 developing a website and need to use Application State

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.