<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET MVC</title><link>http://forums.asp.net/1146.aspx</link><description>Discussions regarding Model-View-Controller (MVC) support in ASP.NET.  &lt;a href="http://forums.asp.net/1215.aspx"&gt;T4MVC subforum&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: this in vb.net: &lt;% using Html.Form&lt;ProductController&gt;(p=&gt;p.Update(ViewData.Product.ProductID))%&gt;</title><link>http://forums.asp.net/thread/2282031.aspx</link><pubDate>Mon, 07 Apr 2008 20:38:52 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2282031</guid><dc:creator>Chuwanga</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2282031.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2282031</wfw:commentRss><description>&lt;p&gt;Hello alivemedia!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;You&amp;#39;re right the lack of lambda-support in VB.NET&amp;nbsp;is really ackward. I use a syntax that works, but is far to long to be nicely readable, but it gives you the benefit of refactoring-support:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;pre class="coloredcode"&gt;&lt;span class="dir"&gt;&amp;lt;%U&lt;/span&gt;sing Html.Form(Of CustomerController)(New System.Action(Of CustomerController) _&lt;br /&gt;     (Function(c As CustomerController) c.Login()), FormMethod.Post)&lt;span class="dir"&gt;%&amp;gt;

    &amp;lt;%-&lt;/span&gt;- FORM CONTENT --&lt;span class="dir"&gt;%&amp;gt;

&amp;lt;%E&lt;/span&gt;nd Using &lt;span class="dir"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As a workaround you need to declare the&amp;nbsp;methods, which you want to use in your Html.Form() call (here it is Login() in my CustomerController class), as functions of type object (or something) else and just return Nothing in the respective Method. This worked for me. A sample Login() method would look as follows:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;b id="1"&gt;1    &lt;/b&gt;&lt;span class="kwd"&gt;Public Class&lt;/span&gt; CustomerController
&lt;b id="2"&gt;2    &lt;/b&gt;    &lt;span class="kwd"&gt;Inherits&lt;/span&gt; System.Web.Mvc.Controller
&lt;b id="3"&gt;3    &lt;/b&gt;
&lt;b id="4"&gt;4    &lt;/b&gt;  &lt;span class="kwd"&gt;Public Function&lt;/span&gt; Login() &lt;span class="kwd"&gt;As Object&lt;/span&gt;
&lt;b id="5"&gt;5    &lt;/b&gt;
&lt;b id="6"&gt;6    &lt;/b&gt;     RenderView(&lt;span class="st"&gt;&amp;quot;Login&amp;quot;&lt;/span&gt;)
&lt;b id="7"&gt;7    &lt;/b&gt;     &lt;span class="kwd"&gt;Return Nothing
&lt;b id="8"&gt;8    &lt;/b&gt;
&lt;b id="9"&gt;9    &lt;/b&gt;  End Function
&lt;b id="10"&gt;10   &lt;/b&gt;
&lt;b id="11"&gt;11   &lt;/b&gt;End Class&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Hope I could help!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Greetings, &lt;/p&gt;
&lt;p&gt;Jimmy&lt;/p&gt;</description></item><item><title>Re: this in vb.net: &lt;% using Html.Form&lt;ProductController&gt;(p=&gt;p.Update(ViewData.Product.ProductID))%&gt;</title><link>http://forums.asp.net/thread/2278513.aspx</link><pubDate>Sat, 05 Apr 2008 13:56:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2278513</guid><dc:creator>alivemedia</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2278513.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2278513</wfw:commentRss><description>&lt;p&gt;Thanks, I tried that syntax with no luck :(&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I will have to go back later and update this stuff, just trying to get it right from the get go.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;having the same problem with the ActionLink helper&lt;/p&gt;</description></item><item><title>Re: this in vb.net: &lt;% using Html.Form&lt;ProductController&gt;(p=&gt;p.Update(ViewData.Product.ProductID))%&gt;</title><link>http://forums.asp.net/thread/2278149.aspx</link><pubDate>Sat, 05 Apr 2008 05:01:53 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2278149</guid><dc:creator>levib</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2278149.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2278149</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;alivemedia:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;font color="#0000ff" size="1"&gt;Function&lt;/font&gt;&lt;font size="1"&gt;(p) p = ViewData.Product.ProductID&lt;/font&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;I &lt;em&gt;think&lt;/em&gt; the proper syntax is &lt;strong&gt;Function(p) p.Update(ViewData.Product.ProductID)&lt;/strong&gt;. 
&lt;p&gt;Check &lt;a href="http://msdn2.microsoft.com/en-us/library/cc138590.aspx"&gt;http://msdn2.microsoft.com/en-us/library/cc138590.aspx&lt;/a&gt;&amp;nbsp;for more info.&amp;nbsp; Honestly, though, if the syntax isn&amp;#39;t familiar to you I&amp;#39;d recommend using one of the other overloads that doesn&amp;#39;t use a lambda.&amp;nbsp; It&amp;#39;ll save you time trying to decipher it when you have to go back and look at it in the future. :)&lt;/p&gt;</description></item><item><title>Re: this in vb.net: &lt;% using Html.Form&lt;ProductController&gt;(p=&gt;p.Update(ViewData.Product.ProductID))%&gt;</title><link>http://forums.asp.net/thread/2278113.aspx</link><pubDate>Sat, 05 Apr 2008 04:27:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2278113</guid><dc:creator>nberardi</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2278113.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2278113</wfw:commentRss><description>&lt;p&gt;VB.NET doesn&amp;#39;t support Lambda expressions. &amp;nbsp;&amp;nbsp;&lt;/p&gt;</description></item><item><title>this in vb.net: &lt;% using Html.Form&lt;ProductController&gt;(p=&gt;p.Update(ViewData.Product.ProductID))%&gt;</title><link>http://forums.asp.net/thread/2277569.aspx</link><pubDate>Fri, 04 Apr 2008 19:33:09 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2277569</guid><dc:creator>alivemedia</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2277569.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2277569</wfw:commentRss><description>&lt;p&gt;How do I do this in VB.net:&lt;br /&gt;&amp;lt;% using Html.Form&amp;lt;ProductController&amp;gt;(p=&amp;gt;p.Update(ViewData.Produc t.ProductID))%&amp;gt;&lt;br /&gt;&lt;br /&gt;This is using a lambda for the form tag in c#, I searched everywhere for the correct vb.net syntax?&lt;/p&gt;&amp;nbsp;I tried this with no luck:&lt;br /&gt;&lt;font size="1"&gt;&amp;lt;% &lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;Using&lt;/font&gt;&lt;font size="1"&gt; Html.Form(&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;Of&lt;/font&gt;&lt;font size="1"&gt; ProductController)(&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;Function&lt;/font&gt;&lt;font size="1"&gt;(p) p = ViewData.Product.ProductID)%&amp;gt;&lt;/font&gt;&lt;font size="1"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>