Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics 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 July 10th, 2008, 11:32 AM
Registered User
 
Join Date: Jul 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 12 Try It Out: Applying Filter (pg 400)

Hi,

I tried this code, and it shows up an error

Please help, i am completely new to asp.net

Deepesh

<%@ Page Language="VB" MasterPageFile="~/MasterPages/ManagementMaster.master" AutoEventWireup="false" CodeFile="Reviews.aspx.vb" Inherits="Reviews" title="Planet Wrox - Management Reviews" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True"
        AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="Name"
        DataValueField="ID">
                <asp:ListItem>"Please make your choice"</asp:ListItem>
            </asp:DropDownList>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                DataKeyNames="Id" DataSourceID="SqlDataSource2"
                style="font-family: Arial, Helvetica, sans-serif; font-size: small">
                <Columns>
                    <asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False"
                        ReadOnly="True" SortExpression="Id" />
                    <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
                    <asp:BoundField DataField="Summary" HeaderText="Summary"
                        SortExpression="Summary" />
                    <asp:BoundField DataField="Body" HeaderText="Body" SortExpression="Body" />
                    <asp:BoundField DataField="GenreId" HeaderText="GenreId"
                        SortExpression="GenreId" />
                    <asp:CheckBoxField DataField="Authorized" HeaderText="Authorized"
                        SortExpression="Authorized" />
                    <asp:BoundField DataField="CreateDateTime" HeaderText="CreateDateTime"
                        SortExpression="CreateDateTime" />
                    <asp:BoundField DataField="UpdateDateTime" HeaderText="UpdateDateTime"
                        SortExpression="UpdateDateTime" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                ConnectionString="<%$ ConnectionStrings:PlanetWroxConnectionString1 %>"
                SelectCommand="SELECT [Id], [Name] FROM [Genre] ORDER BY [SortOrder]">
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSource2" runat="server"
                ConnectionString="<%$ ConnectionStrings:PlanetWroxConnectionString1 %>"
                SelectCommand="SELECT * FROM [Review] WHERE ([GenreId] = @GenreId)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="DropDownList1" Name="GenreId"
                        PropertyName="SelectedValue" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>



 
Old July 10th, 2008, 02:27 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

And the error is?

Maybe you're better off posting this in the book's own forum here at p2p.wrox.com.

Cheers,

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.
 
Old July 12th, 2008, 10:28 AM
Registered User
 
Join Date: Jul 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oops,

That was an easy answer guess i had multiple folders and i belive are some teething problems, because i resumed this after a long break.

Thanks for all your help for this.

By the way as far the problem is concerned, the answers and reasons for anything to go wrong are clearly explained by Imar is the following pages..this book is awesome!

Deepesh






Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 12 (page 400) Try It Out: Applying Filter Deepeshk BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 04:18 AM
Chapter 5 Applying themes to Page Try it Out mcauliff BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 October 3rd, 2007 11:04 AM
Errors on Chapter 12 example(12.8) sonnie ASP.NET 2.0 Professional 2 June 7th, 2006 10:55 AM
Automatically Applying Advanced Filter / Sort bridog39 Access 4 November 24th, 2005 04:18 PM





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