| | |
dropdownlist
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Feb 2009
Posts: 54
Reputation:
Solved Threads: 0
hi,
there...i need help.im not sure if my codes are appropriate..
im getting error telling 'cannot have multiple selection'.
there...i need help.im not sure if my codes are appropriate..
asp.net Syntax (Toggle Plain Text)
<asp'Label id:"lblreport" runat="server" text"type of report"></asp:Label> <asp:dropdownlist selected="true" value="annually"></asp:ListItem> <asp:dropdownlist selected="true" value="Monthly"></asp:ListItem> <asp:dropdownlist selected="true" value="weekly"></asp:ListItem> <asp:dropdownlist selected="true" value="Daily"></asp:ListItem> </asp:dropdownlist>
im getting error telling 'cannot have multiple selection'.
Last edited by peter_budo; Feb 19th, 2009 at 4:08 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
•
•
Join Date: Dec 2008
Posts: 104
Reputation:
Solved Threads: 18
As your error message suggests, you cannot have multiple items selected on a Dropdownlist. You can set only one ListItem's Selected property to true, which will be the default selected Item of your Dropdownlist. Your Dropdownlist should be something similar like this:
ASP.NET Syntax (Toggle Plain Text)
<asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem Selected="True">Anually</asp:ListItem> <asp:ListItem>Monthly</asp:ListItem> <asp:ListItem>Weekly</asp:ListItem> <asp:ListItem>Daily</asp:ListItem> </asp:DropDownList>
![]() |
Similar Threads
- dropdownlist value doesnt get selected (ASP)
- GetSelectedIndex Datagrid? Dropdownlist (ASP.NET)
- disable dropdownlist with javascript (JavaScript / DHTML / AJAX)
- Help with dropdownlist data adding? (VB.NET)
- DataGrid: Edit mode, the index of a dropdownlist does not start at the right Value (ASP.NET)
- GetSelectedIndex Datagrid? Dropdownlist (C#)
- How do I save an index to a particular index of a dropdownlist in a datagrid. (C#)
- Help With Datagrid RE: Creating and Saving DropDownList ReportsToID (C#)
Other Threads in the ASP.NET Forum
- Previous Thread: How to set Global Variable
- Next Thread: how to code
Views: 1135 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 activexcontrol advice ajax asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox child class click compatible confirmationcodegeneration content contenttype countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdown dropdownmenu edit feedback flash flv folder form forms google grid gridview homeedition hosting identity iframe iis index javascript jquery languages list maps menu mono mssql multistepregistration nameisnotdeclared object objects order problem profile ratings refer rotatepage save search security serializesmo.table session silverlight smartcard sql suse textbox tracking typeof unauthorized update validation vb vb.net video view virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment wizard xml





