dropdownlist

asp mvc DropDownList how to pass a selected item in visual basic .net

asp mvc DropDownList how to pass a selected item in visual basic .net i put this in the view: <%=Html.DropDownList("Estados", ViewData("EstadosList"))%> and the compiler says that i have to convert to SelectList becouse ViewData Returns an Object any idea to do this? thxs.. Fernando Soruco ...

Inheriting DropDownList and adding custom values using its DataSourceObject

I'm inheriting a DropDownList to add two custom ListItems. The first item is "Select one..." and the second item gets added at the end, it's value is "Custom". I override DataBind and use the following code: Dim data As List(Of ListItem) = CType(DataSource, List(Of ListItem)) data.Insert(0, New ListItem("Select one...", SelectO...

how to set datasource to dropdownlist

hi all i want to add a datasource to dropdownlist this dropdownlist is one of the column of gridview here i want to add a datasource to dropdownlist at dynamically without using the sqldatasource (vs2008 and c#) ...

ultrawebgrid dropdown column issue

hi i have added the drop down list to the ultra web grid column and saved the value selected in the drop down to the database and when i try to retrieve the data and display the data its showing the value of the dropdown not the text e.g. 4001 - sales it is showing 4001 not sales i want to show the sales text in the drop down how to ac...

ASP.NET AcessDataSource and dropdownlist

Hi I'm using visual studio 2008 with .net 3.5. I have an AccessDataSource that is linked to a access database. I have a dropdownlist that use the AccessDataSource. Everything was done with the wizard and everything was working just fine. At the page load I decided to call the SelectedIndexChanged of my dropdownlist to update someth...

Internet Explorer back button broken when obscenely long drop down lists are loaded

I was working on some ASP.NET 2.0 pages when I noticed that some of the pages' back buttons were unavailable - greyed out. And clicking the drop down menu next to them showed clear results, as if I had come to this page fresh. I looked through the code trying to find something to specifically disable the back buttons (redirects, clever...

Superfish Css/Jquery Menu goes under Flash Content in IE7

http://mindfulintegrations.com/signiacapital/index.html It works fine in FF3 and IE8 using SwfObject2 and wmode=transparent, but for the life of me I can not get the menu to dropdown over the flash content in IE7. Any help would be appreciated. I've tried playing around with Z-indexes, and to be honest my understanding of them is somew...

ASP.net MVC DropDownList Pre-Selected item ignored

I am facing a simular problem as outlined in the question "Html.DropDownList in ASP.NET MVC RC (refresh) not pre-selecting item" I'm using ASP.net MVC 1.0 and need to associated a javascript call when the DropDownList is changed. <%=Html.DropDownList("SelectList", (SelectList)ViewData["SelectList"], ...

asp.net dropdownlist - add blank line before db values

Hi, On my page I have a dropdownlist which gets populated by database values from an SqlDataSource(see code) How can I add my own text or a blank line before the values... <asp:DropDownList ID="drpClient" runat="server" Width="200px" AutoPostBack="True" DataSourceID="dsClients" DataTextField="name" Da...

ASP.NET MVC how to handle the default empty value for dropdown list

I create a dropdown list by using ASP.NET MVC helper like this, <%=Html.DropDownList("Group","-please select a group-")%> and I get the html like this, <label for="GroupId">Group:</label> <select id="GroupId" name="GroupId"><option value="">-please select a group-</option> <option value="15">Business</option> <option value="16">Frie...

Problem with YUI library and asp.net autopostback dropdownlist

Hi all, We are using YUI library in our asp.net project. I have a asp.net autopostback dropdown list which is converted to YUI dropdownlist as the code shown below. Now when user select some value from the dropdownlist the page posts back and the SelectedGroupChanged event fires but before that the confirm dialog box is not appearing. W...

ASP.NET DropDownList SelectedValue property not being set immediately

I have an ASP.NET webform on which I use a DropDownList control to allow the user to select an item and see related results. For some reason when I set the SelectedValue property of the DropDownList the value it's set to is not immediately available. Here's my code: protected void Page_Load(object sender, EventArgs e) { if (!Pag...

There is no ViewData item with the key 'taskTypes' of type IEnumerable<SelectListItem>

I'm getting the error message above when adding an onchange attribute to a Html.DropDownList in ASP.NET MVC: <td><%= Html.DropDownList("taskTypes", (IEnumerable<SelectListItem>)ViewData["TaskTypes"], "None", new { onchange = "document.getElementById('NewTask').submit()" })%></td> When the view initially loads, I do not get the error. ...

DropDown WPF GridView

How implement selectable GridView embedded in WPF ComboBox. ...

Can an asp:DropDownList set to be displayed in a particular direction; up or down?

Is it possible to set the direction that an asp:DropDownList appears on a page (e.g. up or down) in a code-behind/with javascript irrespective of how a browser will render it? ...

Dropdownlist with datasource set and empty value?

Is there a quick way to add a blank value to a drop down list for a winforms application? Some of my dropdowns are bound to lists of objects and some are bound to datarows from a datatable. Since I am setting the datasource property, I can't just add one through code. Is there any quick way of getting a blank value added or will I hav...

Javascript Not Populating Dropdown in Webbrowser Control C#

Hi, there is this classic asp site that is using javascript to populate dropdowns or whatever they called it back then. Well, if I goto this site from the regular browser after a second it fills the dropdown with the data. But in the webbrowser control no such luck almost like Javascript is disabled. For those interested in the sites s...

Lookup lists with NHibernate and ASP.Net MVC

I can't seem to get the value of a select list to populate the value of the parent object. I'm using a wrapper object to bind to so that I have access to the values needed for the SelectList as well as the object which needs the value. I'm willing to bet I'm missing something basic but I can't find it. I have these models: public c...

Can I avoid having an UpdatePanel that kills viewstate?

I selection page that has a gridview that presents the user with a list of data items that they can click on to "drill into" - redirecting them to the data maintenance page. Because the list can get long, we have a series of check boxes and drop-down lists at the top that act as filters. We just implemented an UpdatePanel with an Updat...

Which Repository do I put my SelectList in?

If I have an Invoice Line Items table and a Products table, and I have a dropdown in my invoice line items to select a product, I will need a SelectList to populate the dropdown with product names. Which repository do I put the product SelectList method in, the Invoice Line Items repository or the Products Repository? To me it makes ...