I have a standard editing script with GET and POST, the form has a Save button and a Search button that allows the user to search for a zip code that fills the address and returns it to the form fields. The Search button returns to the Edit Controller method.
The following code is not real, but demonstrates my problem ...
[AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(int CustomerId, string LookupButton) { Customer customer = new Customer(); UpdateModel(customer);
This code works as expected, it simply returns the existing form data, however, when I uncomment the line that manually changes the county field, these changes do not appear on the form. It left me because in uniform
<%= ViewData.Eval("County") %>
"Hello world!" will return. but
<%= Html.TextBox("County") %>
retains its former value!
<input id="County" name="County" type="text" value="" />
The client is an EF4 class.
Any help is greatly appreciated.
source share