Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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 Search this Thread Display Modes
  #1 (permalink)  
Old July 18th, 2006, 04:17 AM
Registered User
Join Date: Jun 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to reference a pic from app_themes to control

I have designed a shopping cart as mentioned in one of the wrox books..The cart is designed as a user control and then it is used elsewhere...What i want is instead of the Edit & Delete links i want to use Images..The problem is also that i use themes..so each theme should use different images..so, here i am stucked!

Here is my complete control design:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ShoppingCart.ascx.cs" Inherits="ShoppingCart" %>
<h1>Your Shopping Cart</h1>
    <asp:GridView SkinID="gvCart" ID="CartGrid" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductId" OnRowCancelingEdit="CartGrid_RowCancelingEdit" OnRowDeleting="CartGrid_RowDeleting" OnRowEditing="CartGrid_RowEditing" OnRowUpdating="CartGrid_RowUpdating">
                <asp:Image ID="Image1" Height="100" Width="100" runat="server" ImageUrl='<%# Eval ("ProductImageUrl","~/assets/{0}") %>' />
        <asp:BoundField DataField="ProductName" HeaderText="Product" ReadOnly="True" />
        <asp:BoundField DataField="qty" HeaderText="Qty" />
        <asp:BoundField DataField="Price" DataFormatString="{0:c}" HeaderText="Price" ReadOnly="True" />
        <asp:BoundField DataField="LineTotal" DataFormatString="{0:c}" HeaderText="Total"
            ReadOnly="True" />
        <asp:CommandField ShowEditButton="True" ShowDeleteButton="True" ButtonType="Image"  />
        There is nothing in your shopping cart.
<br />
<asp:Label ID="TotalLabel" runat="server" Font-Bold="True"></asp:Label>

How do i make this code to read the images according to the selected theme..All folder names are the standard..eg../app_theme/MyThemeName/Images/...

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Wizard Control Reference Colonel Angus .NET Framework 2.0 0 April 28th, 2008 08:54 AM
How do I reference a txtbox control with variable TomW Excel VBA 5 November 28th, 2006 08:57 PM
Reference Page Control from Custom Class wirerider ASP.NET 2.0 Professional 6 February 1st, 2006 07:45 PM
Bad Navigator Control reference horacio_tg BOOK: ASP.NET Website Programming Problem-Design-Solution 0 October 24th, 2003 10:46 PM

All times are GMT -4. The time now is 02:05 PM.

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