Solved

.NET Repeater Eval() Question

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Html fieldset fix its height and width 4 55
Reg Exp to extract Url from string asp 12 57
Record locking on classic ASP 3 62
Can't select treeview node from iframe 2 52
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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

737 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