Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Specified cast is not valid on Eval View modes: 
User avatar
Member
Member
eric.savage-clyral - 1/3/2013 4:19:57 AM
   
Specified cast is not valid on Eval
I am using the following code in a transformation on a custom document type, and the field in question is an integer (allows empty) using control type Document Selector called "Section":

<div class="section"><%# IfEmpty(Eval("Section"), "", "Relating to: <a href='" + GetROMChildUrl(Eval("Section")) +  "'>" + GetROMSearchTitleForNode(Eval("Section")) + "</a>" ) %></div>


When the section is null, it causes a "specified cast is not valid". How can I get around this? It looks like the problem is doing an Eval on a nullable integer in the IfEmpty check?

User avatar
Member
Member
eric.savage-clyral - 1/3/2013 5:43:23 AM
   
RE:Specified cast is not valid on Eval
Never mind - the problem was in my custom transformation