Solved

#eval function on asp.net

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
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…

758 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

17 Experts available now in Live!

Get 1:1 Help Now