Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 13th, 2006, 03:16 PM
Authorized User
 
Join Date: Aug 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default visual web developer 2005

Good afternoon,
I am writing a web application using visual web developer and while trying to create a dynamic dropdown using the SqlDataSource i am getting these errors when i try to correct either one:
'SqlDataSource1_Selecting' is not a member of 'ASP.testdirectortest_aspx

and

Control 'DropDownList1' of type 'DropDownList' must be placed inside a form tag with runat=server.

Anyone ever seen this before?
Here is the code i am trying to use:
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:test1ConnectionString %>"
              OnSelecting="SqlDataSource1_Selecting" SelectCommand="SELECT [TEST_FACILITY] FROM [Test_Facility_Data]">
          </asp:SqlDataSource>
          <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2"
              DataTextField="TEST_FACILITY" DataValueField="TEST_FACILITY" OnSelectedIndexChanged="DropDownList1_SelectedInde xChanged1">
          </asp:DropDownList>

thanks



 
Old September 13th, 2006, 03:27 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Are you creating the control dynamically? Normally I would get this error when I created a control dynamically without adding it specifically to Form.Controls() collection...

"The one language all programmers understand is profanity."
 
Old September 13th, 2006, 03:40 PM
Authorized User
 
Join Date: Aug 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes,
I just went to the place in my web where i would like the dropdown menu to be, then added and configured the Data Source. once i went to view it in the browser, those were the errors i received.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Web Developer 2005 Express Edition - Limits snew BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 7 November 15th, 2007 01:00 PM
Send e-mail by Visual Web Developer 2005 dipanjan22 ASP.NET 1.x and 2.0 Application Design 13 August 5th, 2007 09:16 AM
Visual Web Developer 2005 dipanjan22 ASP.NET 1.x and 2.0 Application Design 2 July 12th, 2007 12:22 AM
SQL Server 2005 using Visual Web Developer carswelljr SQL Server 2005 1 September 14th, 2006 12:43 PM
Microsoft Visual Web Developer 2005 Express Editio FT BOOK: ASP.NET Website Programming Problem-Design-Solution 10 April 24th, 2006 12:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.