Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

#eval function on asp.net

Posted on 2009-07-01
3
Medium Priority
?
304 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 2000 total points
ID: 24867846
let me know the status.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
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…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

824 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