Hello Steve,
As for the databinding expression in ASPX template, they're dynamically
compiled at runtime, and the error you encountered is likely due to the
different compile option between VB.NET and C#. For VB.NET, it is using
latebinding that means wo do not need to convert the object to the actual
expected type and the runtime will use latebinding to evaluate and
determine the object type. However, C# will always enforce type checking
at compile time, if there is type mismatch in code, it will report error.
Thus, for your case, "DataBinder.Eva l" or "Eval"(asp. net 2.0 specific)
will return an "Object" , however, our custom function( such as the
"AddBlankRowMen u" ) will expect a non-Object type parameter, this will
cause the C# compilter report error. What's the object type expected by
the "AddBlankRowMen u" function in your case? You can consider:
1. Explicitly case the object returned from the "Eval" to the expected
type of the "AddBlankRowMen u" function before pass it to the function.
2. Change the "AddBlankRowMen u"'s input parameter to "Object" type , and
perform the type convertion inside the function.
Please feel free to let me know if there works for you or if you meet any
further problem on this.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial
response from the community or a Microsoft Support Engineer within 1
business day is
acceptable. Please note that each follow up response may take approximately
2 business days
as the support professional working with you may need further investigation
to reach the
most efficient resolution. The offering is not appropriate for situations
that require
urgent, real-time or phone-based interactions or complex project analysis
and dump analysis
issues. Issues of this nature are best handled working with a dedicated
Microsoft Support
Engineer by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.