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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:36:52+00:00 2026-05-24T20:36:52+00:00

I have a desktop system that calls a PHP script (script.php) and I send

  • 0

I have a desktop system that calls a PHP script (script.php) and I send a parameter called by “x” to this script (ex: script.php?x=123), but now the PHP scripts are being rewritten in ASP.NET/MVC, but I can’t change the desktop system, then I’ve created a route like this:

routes.MapRoute("ScriptPHP",
    "myscript/script.php",
    new { controller = "MyController", action = "MyAction", x = UrlParameter.Optional }
);

The problem is: MyAction receives a parameter named “id” (MyAction(int id)), and this route works only if I call “script.php?id=123”.

How do I send the parameter “x” and this route convert “x” to “id” parameter name? It’s possible?

NOTE: I can’t change the action parameters.

  • 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-24T20:36:53+00:00Added an answer on May 24, 2026 at 8:36 pm

    You need to change your action method to be the following

    public ActionResult MyAction(int x)
    {
    
    }
    

    Once you do that, it’ll work as you expect.

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

Sidebar

Related Questions

I have a desktop written with Winforms. Now I have requests that people want
I have a developer tool that modifies the local file system using php. These
I have a desktop (winforms) application that uses a Firebird database as a data
We have a desktop application that performs a pretty rigorous set of calculations in
We have a desktop client application developed in Swing. This application interacts with backend
I have a desktop application that will 'sync' with an iPhone application. The sync
I have a desktop application that needs to upload/download images to/from service computer over
I have a PowerShell script that configures web site and web application settings in
We have an integrated system (at least is that what we call it), which
I have done some code in C that happily send the full backtrace with

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.