Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5
This is the forum to discuss the Wrox book Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter Kit by David Sussman, Alex Homer; ISBN: 9780764588075
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old November 3rd, 2007, 06:16 PM
Registered User
Join Date: Nov 2007
Location: Sherman Oaks, CA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 8 - Code doesn't produce a DropDownList

The steps under "Collecting the Delivery Address", starting on page 239, do not work. Specifically the dropDownList is not showing up. I have followed all steps twice to reproduce the error. I have also changed the code to reflect the errata found on this site. Still broken.

I'm moving on to the next step of the wizard in the mean time, but can someone let me know if you've been able to get this to work?

Here's my code (of course if you have the book, you already have the code):

<td style="width: 100px" valign="top">
<td style="width: 100px" valign="top">
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="Read" TypeName="StoredShoppingCart"
            <asp:Parameter Name="DeliveryCharge" Type="Decimal" />
    <asp:FormView ID="FormView1" runat="server" DefaultMode="Edit" DataSourceID="ObjectDataSource1">
            <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/XML-Data/delivery-costs.xml">
            Deliver to
            <asp:DropDownList ID="DropDownList" runat="server" AutoPostBack="True" DataSourceID="XmlDataSource1"
                DataTextField="name" DataValueField="delivery-cost" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
                SelectedValue='<%# Bind("DeliveryCharge") %>'>
Here is the code-behind module:

    Protected Sub ObjectDataSource1_Updating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs) Handles ObjectDataSource1.Updating
        Dim ddl As DropDownList = DirectCast(FormView1.FindControl("DropDownList1"), DropDownList)
        e.InputParameters("DeliveryCharge") = ddl.SelectedValue
    End Sub

    Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
    End Sub

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Query does not produce desired result snufse SQL Server 2005 0 July 2nd, 2008 12:14 PM
C# code for dropdownlist abhishekkashyap27 C# 2005 7 January 23rd, 2008 04:14 AM
expression does not produce a value shoakat ASP.NET 2.0 Professional 1 June 27th, 2007 01:33 AM
dropdownlist code-value pair mapping gagansharma7 General .NET 0 June 27th, 2006 02:11 PM
Write a program to produce a contents page eapsokha Java GUI 1 September 7th, 2004 11:19 AM

All times are GMT -4. The time now is 03:55 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.