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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:27:26+00:00 2026-05-27T18:27:26+00:00

New to MVC, working on an MVC application where the users do searching on

  • 0

New to MVC, working on an MVC application where the users do searching on the home page based on dates and location then the service returns the desired product records that I am filling to the generic list then I display those records on another view, now what I want to do is that the user be able to pick one product and do product request.

public ActionResult Index()
            {            
                DateTime dt = System.DateTime.Now.AddDays(7);
                var m = (from i in Enumerable.Range(0, 12)
                        let now = DateTime.Now.AddMonths(i)
                        select now.Month + " " + now.ToString("MMMM") + " " + now.Year.ToString()).ToList();                       

                ViewBag.day = dt.Day;  
                ViewBag.b = m;

                return View();                                 
        }


[HttpPost]
public ActionResult Index(DateTime PickUpDate, string location)
            {
         //fill data from service 
     TempData["CollectionTemp"] = CollectionList;

                return RedirectToAction("Result"); 
    }

public ActionResult Result()
        {
            List<myCollection> CollectionResult = new List<myCollection>();
            CollectionResult = TempData["CollectionTemp"] as List<myCollection>;

            return View(CollectionResult);
        }

public class myCollection
        {
            public Datetime date { get; set; }
            public string location { get; set; }
}

On the result view i am displaying the records using razor

@if (Model != null)
{
    foreach (var prd in Model)
    {
    fill the table with data
    }
}

now what I want to do to is to create a link for each product that redirects to a new view all details are shown for that particular product. How ? links are welcomed

  • 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-27T18:27:27+00:00Added an answer on May 27, 2026 at 6:27 pm

    This is quite a common thing to do – there are a bunch of tutorials out there – this one is quite comprehensive: http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/getting-started-with-mvc3-part1-cs (part 5 is where it goes into this particular bit: http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/getting-started-with-mvc3-part5-cs).

    In essence what you could do is create an actionlink that passes back the ID of the item that you are editing to an action method on a controller that then gets all the details for that item and returns a view to edit it.

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

Sidebar

Related Questions

I am working on an MVC ASP .NET application. I am relatively new to
I'm working on a ASP.NET MVC 3 application, but I'm rather new to MVC
I am new to Spring MVC. But I had certain experience in working with
Basically what the title says. I created a new MVC application. I'm trying to
I am working on asp.net MVC 3 application. I have created a Razor view
I have a new MVC 2 site that has been working fine on my
I am working on an ASP.NET MVC project which allows users to construct arbitrarily
I'm working on an application using ASP.NET MVC 1.0 and I'm trying to inject
I am working on my first MVC 3 application and am stumped by the
I'm working on a piece of a web application in ASP.Net MVC where the

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.