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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:05:43+00:00 2026-06-03T18:05:43+00:00

I have a link and search button. Clicking on search button posts the page

  • 0

I have a link and search button. Clicking on search button posts the page to a predefined action. Now clicking on a link should post the page to another action and should post all the values hidden varible values to another action. Can it be done.

  • 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-03T18:05:44+00:00Added an answer on June 3, 2026 at 6:05 pm

    Typically A link will generate an anchor tag and it usually gives you an HTTP GET request. Not the post request. You can supply parameters in your link which will be accepted as the parameters of the action method

    @Html.ActionLink("Search","Search","Items",new { @id="nokia" },null);
    

    This will generate a link with a querystring key called id with value nokia.

    ../Items/Search/nokia
    

    or

    ../Items/Search?id=nokia
    

    And your action method with id parameter can handle this GET request

    public ActionResult Search(string id)
    {
      //Do whatever you want to do with the value in id. return a view with results
    }
    

    IF you really want to do an HTTPPost from a link, You can grab the click event of the link in the javascript and make an httppost call. The below script does that with jQuery library.

    $(function(){
    
      $("a").click(function(e){
        e.preventDefault();
        $.post($(this).attr("href"),function(result){
          //do whatever with the results 
        });
      }); 
    
    });
    

    But make sure you have an HttpPost version of the ActionMethod in your controller to handle this request

    [HttpPost]
    public ActionResult Search(string id)
    {
      //This is a POST request.Do whatever you want to do with the value in id. return a view with results
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the link below: <a href='@Url.Action(MyAction,MyController, new SearchCriteriaAffaire { Page=3, PageSize=5 }, null)'>Test1</a>
I have link for example domain.com/de/controler/action?param=value and I want make actionlink to keep same
I have a link on a page that pops up a new window, and
I have a link to a page which invokes the 'Sexy Alert Box' script
I have a link that opens a Thickbox... <a href=page.php?tag=lists-element&keepThis=true&TB_iframe=true&height=450&width=500> Everything works with this
I have this form : <form method='GET' name='search' action='index.php?explore=search'> <input type=hidden name=searchType value=all />
I have a search page where every search result is added to the page
Is it possible to have a link/button that will execute an AJAX/Jquery function to
I have two forms on one page: a results form and a search form.
I have a search field and button. When the user searches something like cat

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.