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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:36:35+00:00 2026-05-20T05:36:35+00:00

i have a URL http://www.mysite.com/RunReport and a controller action: [CompressFilter] public ActionResult RunReport(int field1,

  • 0

i have a URL

http://www.mysite.com/RunReport

and a controller action:

    [CompressFilter]
    public ActionResult RunReport(int field1, int field2, int field3, int field4, int field5, int field6, . . .)

so to run the query with a filter, you wind of having to do something like this:

http://www.mysite.com/RunReport/0/0/0/0/0/1/0. . . .

is there a better way of doing this without such a ugly url and routing?

i want to be able to have persistent URL that maps to specific queries.

  • 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-20T05:36:35+00:00Added an answer on May 20, 2026 at 5:36 am

    You don’t have to have these fields in the Route. You can have them in a query string like so:

    RunReport?field3=1

    You can then combine them into a POCO class like so

    public class MyModel
    {
        int? Field1 { get; set; }
        int? Field2 { get; set; }
        int? Field3 { get; set; }
    }
    

    This makes your Fields optional and your Model class can have some smarts in it too, that can determine which report you want to run for example.

    And controller action

    public ActionResult RunReport(MyModel model)
    

    This will work with either GET or POST (or whatever other verb you want to use

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

Sidebar

Related Questions

if i start off on a Detail page: http:\\www.mysite.com\App\Detail i have a controller action
I have a url on my joomla site http://www.mysite.com/index.php?option=com_content&view=frontpage&Itemid=3220 My Customer wants it to
I need to do this: I have an old URL: http://www.mysite.com/dev-site/some-content-part-here That I want
Suppose I have a website hosted at the url: http://www.mysite.com/ Say this is hosted
When I have a url like: http://www.mysite.com/?MyTest= MyTest shows up as a key in
I have URL: http://www.mysite.com/ here is: $date = new DateTime(2011-11-28); this show me: 2011-11-28
Say I have a url like this: http://www.mysite.com/forum/board1/sub-forum/topics/123 Is there a simple way in
i have a link in my app with the following URL: http://www.mysite.com/test?group=MyGroup the issue
For my site I have a RewriteRule that points the URL http://www.mysite.com/work to a
I have a dynamically created url: http://www.mysite.com/?id=1&title=Home (but really the id can be any

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.