Solved

#eval function on asp.net

Posted on 2009-07-01
3
296 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
This video teaches users how to migrate an existing Wordpress website to a new domain.
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…

786 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