2

I am using CILs in my application to fetch data from the Contnet Broker databae using Discovery Servies. The application works fine for fetching contents from normal dynamic Component Presentation. But when the CP contains the a any c# expression Tags like <%= , <%@ etc. , the application treates those as normal string and does not evaluate those.

Check the attached screenshot.

enter image description here

Am I missing any reference to make it work.

Please help.

** I am using Web 8.5 version.

3

This is normal behavior when retrieving items from a data source. The application server is only able to execute expressions when they are on a file system as aspx pages or controls or custom loaded into memory.

Here is a blog post that covers this topic for a java-based architecture. However, the same concepts would apply for a .NET architecture. http://yatb.mitza.net/2012/12/executing-jsp-dcp-stored-in-database.html

The topic of executing expressions from a database has been discussed by a number of threads out there on the internet. If you google ".net execute expression from database" you'll get a nice list. Here are a few examples:

https://stackoverflow.com/questions/53844/how-can-i-evaluate-a-c-sharp-expression-dynamically

http://www.codemag.com/article/0211081

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.