Sorry, this is actually a duplicate of a question I asked in StackOverflow, but it looks like this discussions forum is far more active than the StackOverflow posts.
http://stackoverflow.com/questions/15640591/composite-c1-mvcplayer-render-fails-when-containing-a-url-action-with-a-page-p
I have a View which fails to render by the MvcPlayer function of Composite. Through a process of elimination I was able to track it down to the following line in the View:
I checked the Composite error log, which stated:
So I assume that composite is picking up on the "?Page=123" part of the URL result from the Action and then is trying to process it as a composite Page reference, which of course it isn't.
Does anyone know how I could get around this issue?
http://stackoverflow.com/questions/15640591/composite-c1-mvcplayer-render-fails-when-containing-a-url-action-with-a-page-p
I have a View which fails to render by the MvcPlayer function of Composite. Through a process of elimination I was able to track it down to the following line in the View:
Url.Action("Action", "Controller", new { Page = 123, PageSize = 180 });
I then went further and discovered that if I changed it to the following:Url.Action("Action", "Controller", new { PageSize = 180 });
The page then renders with no issues.I checked the Composite error log, which stated:
System.Xml.XmlException: '=' is an unexpected token. The expected token is ';'. Line 81, position 63.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, String expectedToken2)
at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(Int32 pos, String expectedToken1, String expectedToken2)
at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(Int32 pos, String expectedToken)
at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
at System.Xml.Linq.XDocument.Parse(String text)
at Composite.AspNet.MvcPlayer.Functions.RenderInternal(String path) in c:\***************\MvcPlayer\Player.cs:line 125
I know in Composite you reference pages within the system like so:<a href="/page(@aPage.Data.Id)">Page</a>
The output of my Url.Action is /Controller/Action?Page=123&Page=180So I assume that composite is picking up on the "?Page=123" part of the URL result from the Action and then is trying to process it as a composite Page reference, which of course it isn't.
Does anyone know how I could get around this issue?