View Single Post
  #1 (permalink)  
Old May 10th, 2009, 03:11 PM
nineismine nineismine is offline
Registered User
Join Date: May 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 1 Page 24 Data Grid + Linked List Box not working VS2008

Hi Guys,

I am using Visual Studio 2008 as my IDE and have gotten to the step where you add the "Where" Condition to filter the gridview by the selected index in the listbox which has States in it. Using the described steps everything tests fine in the "test" area before you finalize it, however when I press F5 to go into debug mode the page loads and the gridbox displays the values that match the default value of "CA". When I change the index of the list box the gridView does not change.

The Code looks ok

<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:pubsConnectionString1 %>"
SelectCommand="SELECT DISTINCT [state] FROM [authors]"></asp:SqlDataSource>
<asp:ListBox ID="ListBox1" runat="server" DataSourceID="SqlDataSource2"
DataTextField="state" DataValueField="state" Height="90px"
onselectedindexchanged="ListBox1_SelectedIndexChan ged"></asp:ListBox>

I tried debugging in both IE and Firefox to no avail.

Has anyone else had this issue?