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

  • Home
  • SEARCH
  • 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 8467605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:41:39+00:00 2026-06-10T15:41:39+00:00

I am rendering my data view as below: @foreach (var movieDetails in Model) {

  • 0

I am rendering my data view as below:

@foreach (var movieDetails in Model)
{
    <div class="sameLine" onMouseOver="focusDiv(this)"  id="c4" onmousewheel="moveFocus(event)" onclick="playMovie(this)">
            <table border ="1" class="contentTable">
                <tr>
                <td align="center">
                <img src = @movieDetails.Thumbnail alt = @movieDetails.Thumbnail class="imgStyle"/>
                <div class="tvShowPanel">
                    @movieDetails.Title
                </div>
                </td>
                </tr>
            </table>
      </div>
}

I want the user to navigate from current page to another page when user click on image or the div containing the image , so I have handle this with javascript but not getting any prompt after that:

function playMovie(obj) {
    alert("Image Clicked");
}

Also please let me know how can I navigate to other page using playMovie ? Shall I use query string querystring with document.location or window.location?

If so , how do I pass the querystring from my view to the javascript?

current app is similar to Youtube, when you click on thumbnail it should navigate to another page and start playing the viedeo.

Edit:

MovieDetails class is as below:

public class MovieDetails
    {
        public string Title { get; set; }
        public string Thumbnail { get; set; }
        // public string URI { get; set; }
        public string Description { get; set; }
        public string MovieURI { get; set; }
        // public List<Response> Response { get; set; }
    }
  • 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-06-10T15:41:41+00:00Added an answer on June 10, 2026 at 3:41 pm

    Put your <img> element inside of <a> element, than you can navigate wherever you want by clicking on image.

    @foreach (var movieDetails in Model)
    {
        <div class="sameLine" onMouseOver="focusDiv(this)"  id="c4" onmousewheel="moveFocus(event)" onclick="playMovie(this)">
                <table border ="1" class="contentTable">
                    <tr>
                    <td align="center">
                    <a href="@movieDetails.MovieURI">
                    <img src = @movieDetails.Thumbnail alt = @movieDetails.Thumbnail class="imgStyle"/>
                    <a/>
                    <div class="tvShowPanel">
                        @movieDetails.Title
                    </div>
                    </td>
                    </tr>
                </table>
          </div>
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble rendering out a template, my data looks like this: var data
I have a view model that looks like this: public class VenueIndexViewModel : BaseViewModel
I have my Controller which pass Data from to view as below: IEnumerable<MovieDetails> jsonData
I'm rendering this Cmenu but the active class isn't showing on the li element
I have this stack trace error when I try view some data in my
I have this simplified model: class Item(models.Model): name = models.CharField(max_length=120) class ItemImage(models.Model): image =
MVC stands for model, view and controller. Backbonejs.or explains this by comparison to Rails,
I use a foreach in my View to loop over my strongly-typed Model and
I use JavaScript for rendering 20 tables of 100 rows each. The data for
I'm trying to layout an HTML table (it's tabular data) and it is rendering

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.