javascript - How to pass the value that you type on textbox to a controller every time you type without having to have a submit button. -


I have a disappointing code that is working but my question is that every time you pass the value of the textbox Type on the text box? Probably using Javascript or JQuery? If someone can help me, then it will be great

SearchProducstController:

  public class SearchProducstController: controller {public activity search search (string name) {var result = name; See Return (); }   

site.master

  & lt;% @ master language = "c #" inheritance = "system.web.mvc.ViewMasterPage"% & Gt; & Lt ;! DOCTYPE HTML PUBLIC "- // W3C // DTD XHTML 1.0 Stronger // n" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-cricket.dtd" & gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Head runat = "server" & gt; & Lt; Title & gt; & Lt; Asp: ContentPlaceHolder ID = "TitleContent" runat = "server" /> & Lt; / Heading & gt; & Lt; Link href = "../../content / site.css" rel = "stylesheet" type = "text / css" runat = "server" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "page" & gt; Using the & lt;% (Html.BeginForm ("searchmain", "SearchProducstController")) {%> & Lt;%: HTML.TextBox ("name")% & gt; & Lt; Input type = "submit" value = "searchmain" /> & Lt;%}% & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; Use AJX (Asynchronous JavaScript and XML). 
The art of AJAX is the exchange of data with a server, and updating parts of a web page - without reloading the whole page AJAX was invented only for this feature. Google AJAX auto-complete text box and what you're talking about.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -