•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,489 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,715 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2742 | Replies: 0
![]() |
•
•
Join Date: Aug 2007
Posts: 23
Reputation:
Rep Power: 2
Solved Threads: 1
Hi Friends,
I'm having a kind of anoying problem, I have a ObjectDataSource with a Select with parameters, one of them receives its value from a DropDownList and the others from textboxes, this dropdownlist parameter seem to not working, and the textboxes are working fine...
The gridview just dont show anything, but when I change the dropdownlist parameter with a parameter with a defaultvalue starts to work.
I checked the passed dropdownlist parameter with javascript before send and works just fine
What do you recommend?
here's my code:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetDataBy" TypeName="DataSet3TableAdapters.SUPERVISIONTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" DefaultValue="" Name="Param1" PropertyName="Text"
Type="DateTime" />
<asp:ControlParameter ControlID="TextBox2" DefaultValue="" Name="Param2" PropertyName="Text"
Type="DateTime" />
<asp:ControlParameter ControlID="DropDownList1" DefaultValue="" Name="Param3" PropertyName="SelectedValue"
Type="string" />
<asp:ControlParameter ControlID="TextBox3" DefaultValue="" Name="Param4" PropertyName="Text"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
I'm having a kind of anoying problem, I have a ObjectDataSource with a Select with parameters, one of them receives its value from a DropDownList and the others from textboxes, this dropdownlist parameter seem to not working, and the textboxes are working fine...
The gridview just dont show anything, but when I change the dropdownlist parameter with a parameter with a defaultvalue starts to work.
I checked the passed dropdownlist parameter with javascript before send and works just fine
What do you recommend?
here's my code:
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetDataBy" TypeName="DataSet3TableAdapters.SUPERVISIONTableAdapter">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" DefaultValue="" Name="Param1" PropertyName="Text"
Type="DateTime" />
<asp:ControlParameter ControlID="TextBox2" DefaultValue="" Name="Param2" PropertyName="Text"
Type="DateTime" />
<asp:ControlParameter ControlID="DropDownList1" DefaultValue="" Name="Param3" PropertyName="SelectedValue"
Type="string" />
<asp:ControlParameter ControlID="TextBox3" DefaultValue="" Name="Param4" PropertyName="Text"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- GetSelectedIndex Datagrid? Dropdownlist (ASP.NET)
- new Hard Drive not recognized (Troubleshooting Dead Machines)
- DataGrid: Edit mode, the index of a dropdownlist does not start at the right Value (ASP.NET)
- Version not recognized ?? (Web Browsers)
- Home Page not recognized by browser (ASP)
- 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#)
- USB not recognized (Windows NT / 2000 / XP / 2003)
- Lite-On LTR CD burner not recognized (Storage)
Other Threads in the ASP.NET Forum
- Previous Thread: how to use a custom class in a page
- Next Thread: Connection String


Linear Mode