After clicking button, Autocomplete textbox should not be empty in MVC3

Posted by Sampath1750 under ASP.NET on 4/10/2012 | Points: 10 | Views : 1898 | Status : [Member] | Replies : 1
mvc3 textbox retaining after button click.

my view code.

<div style="float: left">

States Filter :

</div>

<div style="float: left; padding-left: 10px">



@Html.TextBox("Statestxt")

<div>

<div style="padding-left: 10px; float: left">

<input type="image" value="submit" src="../../Images/FilterBrowse.gif" alt="submit Button" />

</div>



My controller:


public ActionResult AutocompleteAsync(string term)


{

var suggestions = from s in Adm.states


select s.state_name;

var namelist = suggestions.Where(n => n.ToLower().StartsWith(term.ToLower()));


return Json(namelist, JsonRequestBehavior.AllowGet);


}




after clicking submit button textbox should not be empty.

Thanks.




Responses

Posted by: Hariinakoti on: 4/10/2012 [Member] Starter | Points: 25

Up
0
Down
plz tell me clearly what do u want?
our dotnetfunda team will help you...

Thanks & Regards
Hari

Thanks & Regards
Hari

Sampath1750, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response