Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

.NET Repeater Eval() Question

Posted on 2003-11-19
2
Medium Priority
?
723 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

618 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