|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ASP.Net/C# - Drop down list error
This error is kind of irritating me for three hrs.Please suggest what is wrong in my code which throws this error
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'startvalue'. <asp ropDownList ID="ddlfmstarttime" runat="server" DataSourceID="sqlfmstarttime" DataTextField="StartTime" DataValueField="StartValue" SelectedValue='<%# Bind("startvalue") %>'> </asp ropDownList><asp:SqlDataSource ID="sqlfmstarttime" runat="server" ConnectionString="<%$ ConnectionStrings:custConnectionString %>" SelectCommand="SELECT [starttime],[startvalue] FROM tblTimeFrom order by startvalue"> <SelectParameters> <asp:ControlParameter ControlID="lblquerystring" Name="custtid" PropertyName="Text" /> </SelectParameters> </asp:SqlDataSource> |
|
#2
|
||||
|
||||
|
Try to set the SelectCommand to : SELECT starttime,startvalue FROM tblTimeFrom
order by startvalue <asp:SqlDataSource ID="sqlfmstarttime" runat="server" ConnectionString="<%$ ConnectionStrings:custConnectionString %>" SelectCommand="SELECT starttime,startvalue FROM tblTimeFrom order by startvalue"> <SelectParameters> <asp:ControlParameter ControlID="lblquerystring" Name="custtid" PropertyName="Text" /> </SelectParameters> </asp:SqlDataSource> Hope this help ...
__________________
Life is Simple, you make choices and don't look back |
|
#3
|
|||
|
|||
|
Thanks for the reponse but i fixed it.
thank you though |
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > ASP.Net/C# - Drop down list error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|