Click here to Skip to main content
16,004,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please solve the error
I have 2 DropDownList. in the first i am entering the value from editing items of DropDownList and in the second the values are selected from the oracle table depending on the value selected from the first DropDownList



ASP.NET
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="true" Visible="true">
             <asp:ListItem>crt
             <asp:ListItem>lcd
             <asp:ListItem>led
         
         <asp:DropDownList ID="monitor" runat="server" DataSourceID="moni" Visible="false" >
         
         <asp:SqlDataSource ID="moni" runat="server"
        ConnectionString="<%$ ConnectionStrings:constr %>" 
             ProviderName="<%$ ConnectionStrings:constr.ProviderName %>" 
             
             
             
             SelectCommand="SELECT "SRNO" FROM "MASTER" WHERE ("ITEM" = :ITEM)">
             <SelectParameters>
                 <asp:ControlParameter ControlID="DropDownList2" Name="ITEM" 
                     PropertyName="SelectedValue" Type="String" />
             </SelectParameters>



the error shown is in the second dropdown list it gives result as "system.data.datarowview"
Posted
Updated 8-Sep-11 23:03pm
v4
Comments
Raju Prajapati 9-Sep-11 5:38am    
Have you set DataValueField and DataTextField properties of second dropdownlist

Where is the Selected index Change event ? Where is the DropDownList2 Id? In your code ID is "monitor" .
 
Share this answer
 
Hi asok6783,

This is probably because you have not set the DataTextField/ DatavalueField property of the dropdownlist
Just go through the following link
"system.data.datarowview"

Still unable to solve your problem,just send me a query.
Have a nice time!!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900