Working with Html.TexBox and DateTime values.

I am working DateTime value today.  

This doesn’t work.. because the 

wants the DateTime value like “2018-01-01”, so I need to add 

now the whole line look like this

now you can get DateTime value and be able to use the calendar editor that type=“date” provide.

Working on Typeahead

Today, I am working on typeahead with Azure Search.

I am reading, https://docs.microsoft.com/en-us/azure/search/search-autocomplete-tutorial

Before you proceed, you need to make sure you have your suggester fieldset.  Per index, you can have only one suggester field.

On your page use this javascript

This code above uses the jQuery UI Autocomplete library. (https://jqueryui.com/autocomplete/ , see the API here http://api.jqueryui.com/autocomplete/) you can go to https://code.jquery.com/ and find CDN version to simply copy paste to the page.

Now, let’s look at HomeController.cs (or any controller that you set to be called from the javascript)  and related classes to return the suggestions.

/home/suggest?highlihts=false&fuzzy=false needs to return Jason format result.

I actually keep my Azure Search management services in different classes, where I have a method to return a list of suggestions in strings like below.

Then, I have home controller calling this method and return Json as below.

This is it, it works beautifully.