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

[Solved] Url Action Helper

1 Answer 124 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Eugene
Top achievements
Rank 1
Eugene asked on 17 May 2010, 11:04 PM
Greetings,
    Can you please tell me what, if anything is wrong with the following code snippet:

<body onload="init()">

 

    <form id="form1" action="<%= Url.Action(new{controller="Account", action="LoginUser"})%>" method="post" defaultfocus="user" class="logindlg">
    <table width="527" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>..............etc?

This code results in the error:
The best overloaded method match for 'System.Web.Mvc.UrlHelper.Action(string)' has some invalid arguments.

Thanks in advance,
Eugene

1 Answer, 1 is accepted

Sort by
0
Eugene
Top achievements
Rank 1
answered on 18 May 2010, 07:00 PM
Greetings,
    Please disregard the previous post.  Microsoft Visual Studio 2008 uses C#3.0, which does not support anonymous types or object initializers.

Best Regards,
Eugene
Tags
General Discussions
Asked by
Eugene
Top achievements
Rank 1
Answers by
Eugene
Top achievements
Rank 1
Share this question
or