views:

324

answers:

2

Hi everybody.

I have a Controller called ActivationController with a LogOn action, which renders the view LogOn.aspx. LogOn.aspx renders a partial view called LogOn.ascx:

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    LogOn
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Account Activation Step 1 - Log On</h2>

    <p>
        <%Html.RenderPartial("LogOn")<;%>
    </p>

</asp:Content>

When calling the action i'm getting a "Stack Overflow" exception:

An unhandled exception of type 'System.StackOverflowException' occurred in System.Web.Mvc.dll

Any clue?

Thanks in advance!

+1  A: 

This looks wrong:

<%Html.RenderPartial("LogOn")<;%>

it should look like this:

<% Html.RenderPartial("LogOn");%>
Josh E
+4  A: 

Don't bother to reply, i found the issue.

The problem was that partial view should have a different name than the view. :P

Thanks anyway!!

ohhh! my god this fucked me from yesterday thanks man ;)
Sadegh