Solved

.NET Repeater Eval() Question

Posted on 2003-11-19
2
702 Views
Last Modified: 2012-05-04
I'm new to .NET and need help with the following..

I am using a Repeater to display the results of a zipcode locator, I would like to insert the results of a function call, with the argument coming from the result set, but cannot get it working..any help is appreciated. I'm using VB

<tr><td align=right><font color=blue><%# myFunctionCall(Container.DataItem("value"))%> miles</font></td></tr>

Thanks
0
Comment
Question by:Rodney Helsens
2 Comments
 
LVL 9

Author Comment

by:Rodney Helsens
ID: 9782081
I think I may have figure this out, but I am still open to suggestions on the following...

<td><%# distance(lat1, lon1, DataBinder.Eval(Container.DataItem, "lat").ToString(), DataBinder.Eval(Container.DataItem, "lng"), "M") %> miles</td></tr>
       
0
 
LVL 4

Accepted Solution

by:
ainapure earned 50 total points
ID: 9782908
the best would be to use the following:

<tr><td align=right><asp:Label id="mylabel" Text='<%myFunctionCall(DataBinder.Eval(Container.DataItem,"value"))%>' runat="server" /></td></tr>

you can use any stylesheet or set the attributes of your label to match your display needs

-amit
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now