我正在使用mvc3,并有一个下级名单(利用DroopDownListFor助手)。 我将选定的数值确定为我的违约值。 当用户选择一个不同的项目时,该项目的选定财产没有标明,即,违约价值在已完工的html中仍然有选定的财产。 这种正常行为吗? 如果是使用舱位和获得按揭财产,那么它就正确地归入最近选定的项目......这只是退位者如何工作? 我检查了IE、FF、Khat和IE的遗体,甚至在选择之后也拥有选定的财产。
Edit: Infact ive just tested it with firefox 9 + . It does change the html source with the selected changing place.
<option selected="selected" value="2">(0002) </option>
<option value="3">(0003) </option>
确保你查看当前(更正)网页的来源和正确的选择清单。 Control + U
in 或 Chrome。
As you change the dropdownbox, behind the scenes the selected value will have changed. As you have observed. And so submitting etc will use the new selected value.
So its nothing to worry about anyway :)
I have this to populate a drop down list in an ASP.NET MVC view. <%= Html.DropDownListFor(model => model.Bikes, Model.Bikes.Select( x => new SelectListItem { Text =...
I m looking for advice on a decent pattern for dropdown list selection and persistence of the selection with POCO EF please. I have a list of IEnumerable<Country> in my view model where Country ...
In ASP.NET MVC 2, I d like to write a very simple dropdown list which gives static options. For example I d like to provide choices between "Red", "Blue", and "Green".
I am new to ASP.net MVC and I am having trouble getting dropdown lists to work correctly. I have a strongly typed view that is attempting to use a Html.DropDownListFor as follows: <%=Html....
I have a view model that looks like this: namespace AutoForm.Models { public class ProductViewModel { [UIHint("DropDownList")] public String Category { get; set; } [...
I am using incremental sequencing for a collection of objects in a form. All works fine and dandy except when I need to use DropDownListFor. Lots of questions concerning binding a dropdown and ...
In my view model if have a: List<Car> where car has an Id and a name. I want to create a dropdown box using Html.DropDownListFor() what is the best way to hook this up as i want to have ...
- winforms
- combobox
- fogbugz
- java
- date
- internationalization
- asp.net
- iis
- url-rewriting
- urlrewriter
- c#
- enums
- ocaml
- haxe
- algorithm
- string
- viewstate
- .net
- c++
- c
- symbol-table
- mysql
- database
- postgresql
- licensing
- migration
- vb.net
- vb6
- declaration
- vb6-migration
- python
- psycopg2
- backup
- vmware
- virtualization
- gnu-screen
- authentication
- desktop
- excel
- xll
- cultureinfo
- regioninfo
- oracle
- client
- session
- download
- html
- virtual
- constructor
- scenarios
- perl
- full-text-search
- javascript
- ajax
- testing
- oop
- inheritance
- vim
- encapsulation
- information-hiding