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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:44:12+00:00 2026-05-16T17:44:12+00:00

a little problem for ya. in master page i have a search input and

  • 0

a little problem for ya.

in master page i have a search input and link:

<input type="text" value="Searche..." name="txtSearche" id="txtSearche" style="vertical-align: middle; height:14px;" />
<%= Html.ActionLink("search", "Search", "Search", new{ searche = "txtSearche???what is here"}, null) %>

how can i write value in url “value” from input text and then get it in my search controller?

  [HttpGet]
        public ActionResult Search(string txtSearche)
        {
            try
            {
                SearchModel model = new SearchModel(txtSearche);
                if (txtSearche != null)
                {
                    return View(model);
                }
                else
                {
                    return View();
                }
            }

my biggest problem is here-> new{ searche = “txtSearche???what is here”}
i dont know how to make this part working

  • 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-16T17:44:13+00:00Added an answer on May 16, 2026 at 5:44 pm
    public ActionResult Search(string txtSearche, string searche) {
    

    simple 🙂 just put it in the parameters.

    or you also can do string searche = Request["searche"] but in MVC, use the first option 🙂

    Edit: ok i get what you want. you have an input form and you want to use this.

    2 words: USE POST.

    you are trying to make a get request in the URL what is actually a POST request. make a post, and then in your returning view, you can make the query come up in the URL as well.

    the best thing is, make the postback, which will return navigate to the new URL with your searchquery in it with this

    return RedirectToAction("Search", new { searche = txtSearche });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with dynamically loading control's into master page's ContentPlaceHolder. Name of
I have a little problem with a Listview. I can load it with listview
i have little problem with boost::asio library. My app receive and process data asynchronously,
I've run on a little problem today: I have a JS drop down menu
I have a page which contains some search fields to query a database, and
I have found myself with at little problem, and I think a custom model
I'm having a little problem and I don't see why, it's easy to go
Theres is a little problem I want to solve with Haskell: let substitute a
I've got a little problem with Zend Framework Zend_Pdf class. Multibyte characters are stripped
I've got a little problem that's slightly frustrating. Is it possible to set a

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.