This is a migrated thread and some comments may be shown as answers.

VB.NET Multiline Lambda Problems

1 Answer 181 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ryan Salsman
Top achievements
Rank 1
Ryan Salsman asked on 04 Aug 2010, 11:23 PM
I'm attempting to define a tabstrip with VB in visual studio 2010. I had the strip working just fine in C# but when porting it to VB I'm having loads of problems. Nothing appears to be wrong with the markup but I'm getting this error:

Error   3   Overload resolution failed because no accessible 'Content' can be called with these arguments:
    'Public Function Content(value As String) As Telerik.Web.Mvc.UI.TabStripItemBuilder': Lambda expression cannot be converted to 'String' because 'String' is not a delegate type.
    'Public Function Content(value As System.Action) As Telerik.Web.Mvc.UI.TabStripItemBuilder': Leading '.' or '!' can only appear inside a 'With' statement.
    'Public Function Content(value As System.Action) As Telerik.Web.Mvc.UI.TabStripItemBuilder': Leading '.' or '!' can only appear inside a 'With' statement.
    'Public Function Content(value As System.Action) As Telerik.Web.Mvc.UI.TabStripItemBuilder': Leading '.' or '!' can only appear inside a 'With' statement.
    'Public Function Content(value As System.Action) As Telerik.Web.Mvc.UI.TabStripItemBuilder': Leading '.' or '!' can only appear inside a 'With' statement.

Do you know what would be causing this? Do you have any examples of a tabstrip being defined in vb with multiline lambdas?

1 Answer, 1 is accepted

Sort by
0
Ryan Salsman
Top achievements
Rank 1
answered on 05 Aug 2010, 08:02 PM
Well I've figured it out. This was a problem for me in other controls as well. It appears you can't use <%= ... %> inside content blocks with VB.NET. The first one seems to work but then everything after that is broken for some reason. If you replace it with Response.Write then everything works great!
Tags
TabStrip
Asked by
Ryan Salsman
Top achievements
Rank 1
Answers by
Ryan Salsman
Top achievements
Rank 1
Share this question
or