Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 January 4th, 2007, 07:09 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to DureSameen
Default Using DataList with BLL

Hi

I am trying to use thebeerhouse project BLL with a DataList control, coz I needed three records in horizontal direction. Surprisingly Its not showing any record. All I got an empty area , while the same code is working fine with GridViewcontrol.


Thanks,

Regards

Dure Sameen
http://www.duresameen.com
http://www.geekswithblogs.net/ArchitectualInsight
http://360.yahoo.com/dmeena_pk

The season of failure is the best time for sowing the seeds of success.
 
Old January 8th, 2007, 03:11 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to vantoko
Default

can you post some code ? (aspx and codebehind)

 
Old January 9th, 2007, 08:31 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to DureSameen
Default

sure, is that enough code?

A- DataList

<asp:DataList ID="FeaturedListCSSWebTemplates" runat="server" DataKeyField="ID" RepeatColumns="3" RepeatDirection="Horizontal" DataSourceID="objProducts" >
                            </ItemTemplate>
                <div id=ProductInfo>
                <div id=productinfoheader>
                    <asp:Image ID=Image1 width=153 runat=server ImageUrl='<%# Eval("SmallImageUrl") %>' height=85></asp:Image><br />
                    <asp:HyperLink ID=HyperLink1 runat=server Text=View CssClass=featured_show></asp:HyperLink> |
                    <asp:HyperLink id=HyperLink2 runat=server Text=Download CssClass=featured_show></asp:HyperLink>
                </div>
                <div class=prod_desc id=Productdec >Type: '' <BR />Template number: <%# Eval("Title") %><BR />Price:<%# Eval("UnitPrice")%> <BR/>Unique price: <%# Eval("SKU")%>
<asp:Image BackColor=#CBBA70 id=Image4 runat=server ImageUrl='~/images/bot.jpg' width=153 height=8></asp:Image>
</div></div> </ItemTemplate></asp:DataList>

B- DataSource

<asp:ObjectDataSource ID="objProducts" runat="server"
                EnablePaging="True" SelectCountMethod="GetProductCount" SelectMethod="GetProducts"
                SortParameterName="sortExpression" TypeName="MB.TheBeerHouse.BLL.Store.Product">

            </asp:ObjectDataSource>

C. BLL.Store.Products.cs

public static List<Product> GetProducts()
     {
         return GetProducts("", 0, BizObject.MAXROWS);
     }
 
Old January 10th, 2007, 10:04 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to vantoko
Default

is it possible that you are missing
 <ItemTemplate>
in the beginning ?

 
Old January 11th, 2007, 09:45 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to DureSameen
Default

Ohh ..no thats not the case, let me recorrect the code. code is working fine with sqlDataSource if I use a direct sp,


Thanks,

Regards

Dure Sameen
http://www.duresameen.com
http://www.geekswithblogs.net/ArchitectualInsight
http://360.yahoo.com/dmeena_pk

The season of failure is the best time for sowing the seeds of success.





Similar Threads
Thread Thread Starter Forum Replies Last Post
BLL and DAL kss BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 13 November 24th, 2008 03:59 PM
Help with BLL and DAL kss BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 November 20th, 2008 09:23 PM
Help! BLL error. scottlucas58 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 October 8th, 2008 02:35 PM
Profile in BLL Faith ASP.NET 2.0 Professional 3 August 18th, 2008 10:57 AM
Profile in BLL Faith BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 September 14th, 2006 03:57 AM





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