17 July 2017, Comments Comments Off on Generating form results when user first vists page

College essay writing service
Question description
Hi,
I am creating a web application. On a particular page I have a search area, where the user can input details into a search form and click “Search” to submit. Then to the right of that search box, a list of search results will appear.

At the moment when the user visits the page all they can see is “no search result” because that haven’t entered any details to search by. How do I automatically display a list of all the search results potentially available when the user sees the page for the first time? At this stage the user has not completed the form – but how do I show all possible results anyway?

This is a brief overview of the kind of thing I am looking at.

//Getting input details:

@using (Html.BeginForm/……………../ }))
{
@(this.Html.Partial(“Search”, new SearchViewModel { SearchCriteria = this.Model.SearchCriteria}))

//Posting results
/……/

@if (Model != null && Model.SearchResult != null)
{

/……/
@if (Model.SearchResult.Any())
{
foreach (var demand in Model.SearchResult)
{
/……../

else
{

@(IsPost ? “No match was found.” : “No search result.”)

}
This is property of research paper scholars. We provide online essay help to most students in the United States. For all your urgent assignment needs, do not hesitate to ask for our assistance. Sign up for free and let’t graduate together