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 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 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 Professional 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 June 22nd, 2007, 04:59 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , .
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default IMG Displays but text field is not displayed.

 IMage is displayed but the data field is not displayed in item template not sure. Please help
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns=False DataKeyNames="ppID" CellPadding="4" ForeColor="#333333" GridLines=Both OnSelectedIndexChanged="GridView1_SelectedIndexCha nged">
         <Columns>


        <asp:HyperLinkField DataTextField="ppID" DataNavigateUrlFields="ppID" DataNavigateUrlFormatString="ppUpdateAdmin.aspx?pp id={0}"
HeaderText="ppID" />
   <asp:TemplateField HeaderText="Company">
            <ItemTemplate>
                <a href="">
<img border="0" src="C:/DirPurchasingPeople/Images/sList.jpg" width="20" height="15" alt="">

      <asp:HyperLinkField DataTextField=ppID DataNavigateUrlFields="ppID" DataNavigateUrlFormatString="srchDtlPP.aspx?ppid={ 0}" />


            </ItemTemplate>
        </asp:TemplateField>



  #2 (permalink)  
Old June 25th, 2007, 05:27 AM
Friend of Wrox
 
Join Date: May 2006
Location: Northampton, United Kingdom.
Posts: 107
Thanks: 1
Thanked 8 Times in 7 Posts
Default

Try this. (Check the syntax first I may have pasted from my code incorrectly)



<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("ppID", "ppUpdateAdmin.aspx?ppid={0}") %>'
ImageUrl='C:/DirPurchasingPeople/Images/sList.jpg") %>'>
</asp:HyperLink>

regards

Tim


  #3 (permalink)  
Old June 25th, 2007, 07:04 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You can't use local file names for image sources. If I browse to your site, where do I get the image? I don't have a c:\DirPurchasingPeople directory.

-Peter
 


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
#Error displayed in text box on report RayL Access VBA 3 March 16th, 2007 08:12 AM
Text Box .text Property Displays conflicting Valus JPOhlman Visual Basic 2005 Basics 3 August 23rd, 2006 03:39 PM
text displayed incorrectly kmfdm515 ASP.NET 1.0 and 1.1 Basics 0 December 13th, 2004 01:22 PM
Align IMG with text Snib HTML Code Clinic 12 April 8th, 2004 11:16 AM
How to open Word imbeded in SQL Srv img field? slava123 ADO.NET 0 November 12th, 2003 05:09 PM



All times are GMT -4. The time now is 09:04 AM.


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