cascadingdropdown

Problems with AJAX CascadingDropDown and DropDownList SelectedValue in EditItemTemplate

*爱你&永不变心* 提交于 2019-11-28 09:33:32
问题 I am having problem in EditItemTemplate of FormView. When I use such code in InsertItemTemplate everything works: <asp:DropDownList ID="Lic_PosiadaczLicencjiIDDropDownList" runat="server" SelectedValue='<%# Bind("Lic_PosiadaczLicencjiID") %>' /> <asp:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="Lic_PosiadaczLicencjiIDDropDownList" Category="Knt_Kod" ServicePath="~/ManagerLicencjiService.asmx" ServiceMethod="GetKontrahenci"> </asp:CascadingDropDown> But when I use

Cascading dropdown lists in ASP.NET MVC 5

不打扰是莪最后的温柔 提交于 2019-11-27 22:19:01
问题 I am wondering if there's some new helper or method introduced in ASP.NET MVC 5 to implement cascading dropdown lists. I know a way to implement cascading dropdownlist behavior in MVC 3 and MVC 4 that is by using a JSON call http://www.dotnet-tricks.com/Tutorial/mvc/HL53191212-Custom-Validation-for-Cascading-Dropdownlist-in-MVC-Razor.html So anyone knows a better way to implement cascading dropdownlists in MVC 5? 回答1: I know that this is an old question but somebody still may find it useful I

ASP.NET MVC - Cascading Drop Down

我的未来我决定 提交于 2019-11-27 08:09:04
I'm currently learning ASP.NET MVC and using Nhibernate. I would like to use Cascading Drop-Down Boxes. Has anyone managed to get cascading drop-down boxes working in MVC? Updated: I have looked at the following website: link text and used method 1. Controller Code var makeList = new SelectList(makeRepository.ListMakes (), "Id", "make",1); ViewData["Makes"] = makeList; //// Create Models view data var modelList = new CascadingSelectList(modelRepository.ListModels (Convert.ToInt32(makeList.SelectedValue.ToString())), "ModelID","Id", "Name"); ViewData["Models"] = modelList; View Code <%= Html

Easiest way to create a cascade dropdown in ASP.NET MVC 3 with C#

自闭症网瘾萝莉.ら 提交于 2019-11-26 00:36:00
问题 I want to create two DropDownList in a cascade using MVC3 (preferably Razor ) with C# . I would like to have one dropdown where you can choose the year and another one where you can choose a specific set of months depending on the selected year. Let\'s put it simple. When I choose the current year (i.e. 2011) in the dropdown list \"year\", the dropdown list \"month\" gets populated with the months until the current month (i.e. March). For the other cases (other years) no restriction is given.

How to populate a cascading Dropdown with JQuery

拥有回忆 提交于 2019-11-26 00:29:10
问题 i have the following problem: I started to create a form with HTML an JS and there are two Dropdowns (Country and City). now i want to make these two dynamic with JQuery so that only the cities of the selected countries are visible. I\'ve started with some basic JS which worked fine but makes some trouble in IE. Now i\'m trying to convert my JS to JQuery for a better compatibility. My original JS looks like this: function populate(s1, s2) { var s1 = document.getElementById(s1); var s2 =