Basically I have 3 drop down lists for security questions. I have java script setup that will spring an alert when the box is changed. I need to know how to add/remove or show/hide an option. like if the first box selected option 1....remove option one from the other 2 drop downs as possible selections.
...
When launching a modal radwindow in IE 6, any dropdown's visible on the parent page are hidden. Once they are hidden, they are gone even after the modal has been closed. These are pure ASP.NET dropdownlists. There is nothing special about the dropdown's that are hidden - I can add new dropdowns to the page with nothing in them, and th...
I have a ComboBox with a list of names. I don't want to allow new values, so I set the DropDownStyle to DropDownList.
When typing to select a name, it only allows one letter. So if I type "T" it will jump to the first name starting with "T". If I then type "o", it will not jump to the first item starting with "To", but to the first item...
Hi -
The method has a return type of collection, i am calling the method from the aspx page in order to populate a drop down -> ddlDropDown. I am binding he DataTextField of the ddlDropDown with the BusinessEntity.Name and the DataValueField with BusinessEntity.Id, the business entity contains another id which is BusinessEntity.Produc...
HI All,
I have created a dropdown for my view which works well up to saving the data.
The Model State shows invalid on the object that is selected in my dropdown list.
EG.
I have a "Asset" which has a "Project" dropdown list.
When I save the Asset the correct ID is in place for the Project from the dropdown list, but the Project itself...
My Problem was: Add a value to a div element in a dropdown list.
Ok Guys, I've resolved my problem with the help of @David.
I've always wanted to know how to design the <select> <option> tags, but now I think I found a solution to get away from them and use whatever element I want. Ok here is my code:
<!DOCTYPE html PUBLIC "-//W3C//DT...
I want to fill dropdownlist which is inside FormView. I'm writing this code at PageLoad event:
DropDownList ddlTypeOfPayment = dvBooking.FindControl("ddlTypeOfPayment") as DropDownList;
But when I compile itraises the error "Object reference is not set to an instance of object".
I'm using objectdatasource to bind formview.
How can I ...
I inherited a site which I am in the middle of updating which has a DropDownList and a RangeValidator assigned to it. The data is bound to the dropdown on Page_Load. The values are retrieved from the database so the value property of each item is set to the unique ID of the item in the DB.
The RangeValidator looks something like:
<asp:...
Okay I have a question, may be simple. But I cannot seem to understand what is going on. I have 3 security question drop down menus. I have javascript on the ASPX page that removes questions/repopulates them when you select a questions (so you cannot reselect the questions in the other 2 boxes). This works wonderfully when a user is edit...
When someone selects a drop down list item, I want to redirect to the same page but with the querystring set with www.example.com/?somekey=selected-value
where selected-value is the numeric value of the option.
I am using jqeury if that makes it easier.
...
I am trying to get a drop down and a form view to work together. I've never used form views before. I also am using the entity framework to do everything. This is also my first time with it.
I want to be able to have a drop down, that is populate from the same data source as the form view. So far that works fine.
I then want to be ...
Trying to load data into a drop down list when a user selects one of two radio buttons. the bookGenres.xml file is in the same directory as my script. I'm out of ideas.
XML:
<?xml version="1.0" encoding="utf-8" ?>
<Genres>
<Fiction>
<book>Sci-Fi</book>
<book>Fantasy</book>
<book>Horror</book>
<book>Romance</book>
...
Given the following
public class MyControl : CompositeControl
{
private DropDownList myList;
protected override void CreateChildControls()
{
base.CreateChildControls();
myList = new DropDownList();
myList.AutoPostBack = true;
this.Controls.Add(myList);
if (!Page.IsPostBack)
{...
With the following code:
<script type="text/javascript" src="../../Scripts/jquery-1.4.1.js" />
<script type="text/javascript">
$(function () {
$('#selectOptions').change(function () {
$(this).parents('form').submit();
});
});
</script>
...
<% using (Html.BeginForm("PostedValue", "Home"))
{ %...
i have an asp.net mvc view with the following code to show a dropdown list:
<% = Html.DropDownList("filter", Model.MyList, Model.MyDefaultValue, new { @id = "filter", @class = "complete" })%>
Model.MyList is a List with my items and one blank one at top and Model.MYDefaultValue is a string.
When i run this it looks like it works but...
Hi,
I have this DropDownList bound to a XmlDataSource, but the XPath must depend on another input (another DropDownList). I modify the XPath and rebind inside the parent DDL's SelectedIndexChanged, but the page does not refresh. What should I do to display the update?
protected void ProductDropDownList_SelectedIndexChanged(object sende...
In the ViewModel:
SelectSafetyContacts = new SelectList(subcontractRepository.GetContacts(Subcontract.company_id), "contact_id", "contact_name", Subcontract.safety_contact);
In the Repository:
public IQueryable<contact> GetContacts(Guid id)
{
return
db.companies
.Where(c => c.active_status == true)
...
Hi guys,
When we click on drop down combobox control in our windows form, it shows the list automatically.
But when we press tab and navigate to that control from keyboard it doesn't shows the list automatically. So in other to show the list automatically on receiving focus what should be done?
...
I have two nested DropDownLists (the value selected in the 1st ddl will limit the content of the 2nd ddl).
The example attached here runs fine outside of a GridView. As soon as I try to insert this into a GridView, I get an error because I cannot identify the ControlID to use in the ControlParameter.
The code outside of the GridView l...
Hi,
Does anyone know how I can concatenate two columns in my subsonic datasource? I want to display a first and last name in this dropdownlist but I don't want to put them in the same SQL column.
Thanks in advance!
...