Solved

.NET Repeater Eval() Question

Posted on 2003-11-19
2
708 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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 hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

815 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

8 Experts available now in Live!

Get 1:1 Help Now