Hi,
I have very simple control:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ConfiguratorMVC.Models.SpecyficationController.ViewSpecyficationViewModel>" %>
<link type="text/css" rel="Stylesheet" href="/Content/shCore.css" />
<link type="text/css" rel="Stylesheet" href="/Content/shThemeDefault.css" />
<h2><%= Model.Specyfication %></h2>
<br />
<pre class="brush: xml">
<%= Model.Content %>
</pre>
<script type="text/javascript" src="/Scripts/shCore.js"></script>
<script src="/Scripts/shBrushXml.js" type="text/javascript"></script>
<script type="text/javascript">
SyntaxHighlighter.all();
</script>
and when i access this control directly through controller action, it renders very well.
But when i want to show it on another page as a result of user interaction:
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="leftColumn">
<ul>
<% foreach ( var specyfication in ViewData["Specyfications"] as IEnumerable<String> )
{ %>
<li>
<%= Ajax.ActionLink(specyfication, "View/" + specyfication, new AjaxOptions() {
UpdateTargetId="content",
InsertionMode=InsertionMode.Replace }) %></li>
<% } %>
</ul>
</div>
<div id="content" />
</asp:Content>
it doesn't highlight code. Maybe i need to run highlight function on page instead of partial? The last time i saw asp.net mvc was beta 1 so i guess a lot of changes happend :)
Have a nice day :)