Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services 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 December 29th, 2003, 02:32 PM
Registered User
 
Join Date: Dec 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default display an image (more info)

in the HTML code displayed on page 99 of 'Building Web Solutions with ASP.net', the example is type cast as an int because the boss column (I'm gussing) is numeric. In my case, my column is DateTime. If I type cast it as DateTime, DateTime is not recognized. String does not work either.

Here's my HTML:
<asp:TemplateColumn HeaderText="Status">
<ItemTemplate>
<asp:image runat="server" Width="79px" Height="79px" ImageUrl='<%# GetProperBmpFile(DataBinder.Eval(Container.DataIte m,"AccreditationExp")) %>'/>
</asp:Image> </ItemTemplate> </asp:TemplateColumn>

My code behind:
//expDate is DateTime type and a string is returned

fileName=GetProperBmpFile(expDate);

public string GetProperBmpFile(DateTime exp)
{
  string stringDate;
  stringDate = exp.ToString();
  return "BeautyAndTheBeast.bmp";
}







Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image-create & save thumbnail-display image angshujit ASP.NET 2.0 Professional 6 July 11th, 2013 10:34 PM
How to Display the image from the image field. mikeparams SQL Server 2000 1 October 29th, 2004 02:23 AM
error while trying to display db info darkhalf Classic ASP Databases 1 March 14th, 2004 06:59 AM
INSERT info into a Access database for display sideshow245 Classic ASP Databases 2 January 7th, 2004 04:25 PM
Chapter 10 Enhanced File Info Display exercise err ssn651 BOOK: Beginning ASP 3.0 8 August 27th, 2003 10:35 AM





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