ASP Net CORE Select List

preview_player
Показать описание
In this ASP.NET Core Tutorial,
We will learn how to Create Cascading SelectList and populate the selectlist dynamically.

In Here We Have two Select Dropdown list.

The first select dropdown list has Country Names.
and the second selectList has City Names.

when we select a Country From the Country SelectList
The cities of the Selected Country will be loaded
in the cities SelectList from the Database using the AJAX Call.

Let us see How to create it.

CDN

Thank You.
Рекомендации по теме
Комментарии
Автор

Thank you very much sir, for creating this kind of amazing Tutorial. finally found exact tutorial that is am looking for.

moniruzzamanmonir
Автор

This was a great lesson!!! This is exactly what I needed to learn. I did have a hard time following you on the AJAX part (around 18 minutes in ). I struggled to see the bottom of the code where all the closing parenthesis goes. I was able to figure it out on my own. This worked for me:

NOTE I MODIFIED MY CODE YOU USE Countryid instead of CountryCode!!!!

@section Scripts {
@{await
<script type="text/javascript">
$(document).ready(function() {
{
var selectedCountry = $('#lstCountry').val();
var citySelect = $('#lstCity');
citySelect.empty();
if (selectedCountry != null && selectedCountry != '') {
if (cities != null && {
citySelect.append($('<option/>', {value: null, text: "Selected City----"}));
$.each(cities, function(index, city) {
citySelect.append($('<option/>', { value: city.value, text: city.text}));
});
}; ///goes with if (cities)
});///goes with .getJSON
}; //goes with if (selectedCountry)
});// goes with changed function
});//goes with if document ready
</script>
}

bassethoundgang
Автор

Amazing the video explaining need more videos 👌👌👌👌

prabhakarant
Автор

Thank you very much for your great video. Feeling relaxed with this solution. :-)

kakmca
Автор

Thank you very much for this great tutorial. you did great. but I wish you could put source code as well to make this perfect.

ehsanehr
Автор

Really good tutorial and video. Have entered the code but cannot get the cities to display. Would welcome some suggestions as to where to check please Aniz. Thank you

petegarner
Автор

Awesome video, thank you very much!

How can someone who is new to JavaScript/jQuery learn how to perform what you used with this tutorial along with your other tutorials using JS and jQuery with .Net Core.

bl
Автор

Hi? Please is posibble if you have the Repository or code? Have error and follow every steps :(

michaelacevedo
Автор

Excellent, Can we get code of this project ?

farrukhazadpak
Автор

This video very useful but i need without entity framework. ..pls help me

pratikparmar
Автор

thankyo very helpful, but can you give a tutorial to edit the column sir

nadyarahmalestanti
Автор

Hi, please i want know if you have the repository for this tutorial thanks

michaelacevedo