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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:08:30+00:00 2026-05-16T07:08:30+00:00

I just started ASP.NET MVC (coming from WebForms) and I’m struggling with some really

  • 0

I just started ASP.NET MVC (coming from WebForms) and I’m struggling with some really basic concepts.

I want to create a single page that uses a textbox for date input. I would like the date input to be passed to the index of my controller which looks like this:

  public ActionResult Index(int month,
                              int day,
                              int year){

        var visitors = visitorRepoistory.FindVisitorsByDate(month, day, year).ToList();

        return View("Index", visitors);
    }

Up to this point I have used scaffolding with strongly typed views so everything was kind of glued together for me.

What would/should my view look like? Would I use an actionlink (this is a get request after all, right?) and not a submit button.

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-16T07:08:31+00:00Added an answer on May 16, 2026 at 7:08 am

    EDIT after comment:

    Simplest way is to make the search input page post (not get) back to some other method, parse the date out, then redirect to the Action you have specified.

    If you want to do it through get, then you can use some Javascript trickeration to link to whatever they type in, but I recommend the former.

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

Sidebar

Related Questions

I just started with ASP.NET MVC 1.0. I've read through some tutorials but I
I’ve only just started using ASP.NET MVC, and I have a somewhat trivial question:
Have just started playing with ASP.NET MVC and have stumbled over the following situation.
I've just started working with ASP.NET MVC now that it's in beta. In my
I'm just getting started with ASP.NET MVC. What is the difference between MapRoute and
I have just started playing with the ASP.Net MVC framework, and today I created
Just getting started using MVC in ASP.NET, I'm going to have it so users
I just started a new project, and now with ASP.NET MVC being designed in
Before I ask my question: I just started ASP.NET MVC, so an advanced answer
can anyone help? I have just started asp.net mvc and its all working.. entering

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.