?
Solved

.NET Repeater Eval() Question

Posted on 2003-11-19
2
Medium Priority
?
724 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 200 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

840 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