How to Create Cascading Dropdown List | Country, State and City Cascading Example in ASP.NET CORE

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 21

  • @DG-cd3jb
    @DG-cd3jb ปีที่แล้ว

    Hi. It’s very informative. I have a usecase that is required to make an Ajax call to the google-city-list api once user enter postal code, then we need to auto populate city and the country on the registration page dropdown fields, then state should be auto populate once user choose the city. If there are multiple cities and the countries for the same zip code, then populate list of cities in the dropdown and country dropdown, but for the country dropdown field must be append with “not found or other” option during multiple countries in the backend api response. Any helpful references and thoughts on this usecase ?

  • @linhngo841
    @linhngo841 ปีที่แล้ว +2

    Thank you very much It's useful for me

    • @CodeWithGopi
      @CodeWithGopi  ปีที่แล้ว

      Thanks for your valuable feedback and support 👍

  • @raimontanez6321
    @raimontanez6321 ปีที่แล้ว

    Great explanations. I followed step by step and it worked for me. The one thing I had issue with that wasn't clear is in the js file you have to make sure data.id and data.name match the names as they are in the model. In my case it was data.id and data.transactionTypeName.

  • @TrendPulse-m9n
    @TrendPulse-m9n หลายเดือนก่อน

    Pls make a video on how to add the country, state and city file

  •  ปีที่แล้ว

    Great job, one question, what if there are some other controls that have DataAnnotations like required but after the ajax calls the messages errors don´t display anymore, how could send all the validations messages in dataannotations again? thanks

  • @bhanuchaurasia6335
    @bhanuchaurasia6335 ปีที่แล้ว +1

    Jabardast

  • @nesarazimi2221
    @nesarazimi2221 ปีที่แล้ว

    Thanks for your nice tuttorial.
    could you explain how to work with cascading dropdown in edit menu i want
    the drop down lists to be selected as what i selected in create page

  • @shabanelmogy7912
    @shabanelmogy7912 ปีที่แล้ว +1

    thanks

  • @josephpondugula458
    @josephpondugula458 ปีที่แล้ว

    Great Job explaining. can you Please provide source code link

  • @erickdouglas
    @erickdouglas ปีที่แล้ว

    hello! how can I cascade this DropDownList in the Create view?

  • @nikby7301
    @nikby7301 ปีที่แล้ว +1

    I'm in error. How to fix if in the first sheet when outputting it writes: undefined

    • @rajaji83
      @rajaji83 ปีที่แล้ว

      did you find any solution to it

    • @raimontanez6321
      @raimontanez6321 ปีที่แล้ว

      @@rajaji83 I had this problem as well. It took me a minute to figure it out but you have to make sure this line of code
      $('#countries').append('' + data.name + '' (in the js file) that data.id and data.name are the model field names. In my case it was data.id and data.transactionTypeName. Hope this helps.

  • @simrankumari9438
    @simrankumari9438 ปีที่แล้ว

    When I return JsonResult(countries) it shows error JsonResult is not a constructor

  • @TwinkleChaudhari-w2r
    @TwinkleChaudhari-w2r ปีที่แล้ว

    why it's showing blank? I can't see any dropdown list?

  • @chandrakumar1053
    @chandrakumar1053 9 หลายเดือนก่อน

    how can resolve

  • @Xmukherjee
    @Xmukherjee ปีที่แล้ว

    Server Certificate error can also be fixed with ;Encrypt=False (in case of sql server authertication)
    "ConnectionStrings": {
    "DefaultConnection": "Data Source=YORK;Initial Catalog=DBONE;Persist Security Info=True;User ID=sa;Password=@password;Encrypt=False"
    },

  • @chandrakumar1053
    @chandrakumar1053 9 หลายเดือนก่อน

    jquery is not working

  • @ppp5921
    @ppp5921 ปีที่แล้ว

    can u explain in Hindi ?