PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

Need help with DataBinder.Eval(Container.DataItem, "mycolumn")

 
 
Tim Burkart
Guest
Posts: n/a
 
      10th Feb 2008
I'm using <asp:accessdatasource> and displaying the results in a
<asp:datalist>. In order to eliminate the decimal digits in the
formatted currency output I have inserted this code in the datalist
<itemtemplate>.

The problem is I get an error saying that "Container" is not declared.
How can I reference this dataitem in this context?

<% Dim nfi As New System.Globalization.NumberFormatInfo()
nfi.CurrencyDecimalDigits = 0
nfi.CurrencySymbol = "$"
Response.Write("<div style='height:18px;'>On Sale&nbsp;" &
String.Format(nfi, "{0:c}", DataBinder.Eval(Container.DataItem, "Web
Price")) & "</a></div>")
%>

Thank you!
Tim
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I really need help. Need a formula. Need it yesterday. =?Utf-8?B?RGVubmlz?= Microsoft Excel New Users 1 12th Mar 2007 09:53 PM
HELP NEEDED FAST!!! HELP HELP HELP HELP HELP HELP FAST HELP NEEDED Jonathan Windows XP General 10 13th Jan 2005 03:22 AM
HELP HELP HELP HELP HELP HELP =?Utf-8?B?U2FuYXRhcml1bV83?= Windows XP General 2 25th Sep 2004 04:00 PM
Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! -$- Windows XP Internet Explorer 2 21st Dec 2003 11:45 PM
Please need HELP - Need to add and INPUT BOX so that users need to enter a PASSWORD to use a workbook Marcello do Guzman Microsoft Excel Programming 2 9th Dec 2003 06:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:05 PM.