MVC C# Can't access Model Data

I have a class setup that captures a List of values. The class is calling a stored procedure and it captures the values correctly.
The variable below "searchresults" pulls back data as per below.  

I need to return the results to the view and it never displays the data on the screen. I have a textbox which I'll add the code below and it never picks it up.

My Call:
var searchresults = data.seekcustomer(paramname);


return View();

VIew Page:
<input type="text" class="form" @Html.EditorFor(model => model.CustomerName)

Top of View Page:
@model AppModel.Customers

Results on the VIew Page:
1. Blank Results

This is how I get data:
<input type="text" class="form" @Html.TextBox("txtCustomer", (string)ViewBag.Customer) />

Issue with this is when I change a value and click Submit button then it doesn't pass the variables over to the controller.

Any suggestions on either method would be appreciated.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Carl TawnSystems and Integration DeveloperCommented:
It's a bit difficult to see what exactly you are doing from fragments and arrangement of code in your post. However, in this line:
return View();

Open in new window

You are not actually passing any data to your view. If you are returning just a single Customer object then I suspect it should be:
return View(searchresults[0]);

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jeffreyjseamanAuthor Commented:
wow. Incredible. I'm not sure how I didn't try that out. It worked.
In addition I found another solution. If I declared a string variable and did Request.Form["name"].ToString(); on the controller it brought back over the data as well.

Thank You on a nice job.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.