| | |
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
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax appliances asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn cac checkbox child class click compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownmenu dynamic edit embeddingactivexcontrol feedback findcontrol flash flv form forms gridview homeedition hosting iframe iis javascript jquery list menu mono mssql multistepregistration nameisnotdeclared novell objects order problem ratings relationaldatabases rotatepage save search security serializesmo.table sessionvariables silverlight smartcard sql ssl suse textbox tracking treeview typeof unauthorized validatedate validation vb.net video virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment wizard xml





