View Single Post
  #2 (permalink)  
Old July 12th, 2008, 04:18 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Deepesh,

Take a look at step 9 on page 402:
Quote:
quote:Save all your changes and open Reviews.aspx in your browser. If you get an error, ensure that you set the Value of the static ListItem in the drop-down list to an empty string (“”).
Step 10 on page 400 shows this as well. Looks like you forgot that step as your ListItem looks like this:
Code:
<asp:ListItem>"Please make your choice"</asp:ListItem>
instead of this:
Code:
<asp:ListItem Value="">Please make your choice</asp:ListItem>
Without the empty value attribute, the text Please make your choice is used as the drop down's value. This text cannot be converted to an Integer to be passed SelectParameters for the DataSource and thus you get the error you posted.

Hope this helps,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote