Solved

#eval function on asp.net

Posted on 2009-07-01
3
300 Views
Last Modified: 2012-05-07
Can anyone tell me why this is complaining at compile time?

the second code snippet works fine!
--this doesnt work
 
<AppointmentTemplate>
                          
                             <div style="color: #0000AA; font-size: 10px;">
                                     <%
                                         Dim eee As String = #Eval("CustomerID")
                                         
                                         Dim aaa As String = getCompanyNameFromID(eee)
                                         Response.Write(aaa)
                                     %>
                             </div>
                             
 </AppointmentTemplate>
 
 
--but this does
 
<AppointmentTemplate>
                          
                             <div style="color: #0000AA; font-size: 10px;">
                                     <%#Eval("CompanyName")%>
                             </div>
                             
</AppointmentTemplate>

Open in new window

0
Comment
Question by:philip_doherty
[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
3 Comments
 
LVL 5

Expert Comment

by:Muralidharanp
ID: 24753073
Please try the following Code in your aspx page

 
         <%# getCompanyNameFromID (Eval("CompanyName").ToString()) %>
 


0
 

Author Comment

by:philip_doherty
ID: 24851128
trying it ou
0
 
LVL 5

Accepted Solution

by:
Muralidharanp earned 500 total points
ID: 24867846
let me know the status.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

636 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