umbraco

Failed to load viewstate. The control tree into which viewstate is being loaded

前提是你 提交于 2019-11-28 23:31:55
I am receiving the following error message after an HTTP POST on an ASP.NET form hosted inside a UserControl: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. Here's additional info: I'm running .NET 4.5 RC It's an Umbraco 4.7-based website On my local dev machine the form works perfectly This error only occurs

MVC-Mini-Profiler - Web Forms - Can't find /mini-profiler-results

混江龙づ霸主 提交于 2019-11-28 20:32:38
问题 I'm trying to get MVC-mini-profiler to work with webforms. NUGET I've installed the Nuget package. PM> Install-Package MiniProfiler Head I have this in the head section of my website. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <%= MvcMiniProfiler.MiniProfiler.RenderIncludes() %> DAL I'm using it inside one function as a POC. This is not in the Global.asax (I dont know if that's required or not.) profiler = MiniProfiler.Start

Is Orchard or Umbraco MVC?

若如初见. 提交于 2019-11-28 10:52:08
I'm much happier with the quality of output I can get with MVC over webforms: hand crafted HTML that isn't full of additional machine generated gubbins (polite term). I realize of course that MVC is about a lot more than this, but concentrating on just that "view" part... I'm looking at Orchard or Umbraco for a project. I see both support Razor syntax (Umbraco just about) - but with my strong leaning to MVC Views rather than webforms, does that rule out Umbraco? All the Umbraco reading I've found so far is about the XSLT engine, as the razor syntax is brand new, which scares me :-) Orchard

umbraco razor - getting fields from content

[亡魂溺海] 提交于 2019-11-28 08:50:46
I have a 6 items of the same content type "news", in each item I have a field newsIntro. I want to put the fields in specific pages on another page so I need to target a specific field so it may be newsIntro on node 1702. I have tried a few things like @1720.newsIntro how do I target a specific field Thanks There are some great resources you should take a look at while you are learning Razor: Umbraco Razor Feature Walkthrough - An eight part blog post series of many of the new Razor features in Umbraco 4.7 with examples. Razor DynamicNode Cheat Sheet - A PDF of all the properties and methods

How to Prevent MVC 4 Child Application inheriting Parent Application (Umbraco MVC3) web.config

丶灬走出姿态 提交于 2019-11-28 05:30:12
问题 I have Umbraco deployed on the server. Currently I am trying to deploy MVC 4 Application as a child application but somehow the child's views\web.config inherits the configSections and sectionGroup from Umbraco's web.config. This results in the following error Section or group name 'system.web.webPages.razor' is already defined. Updates to this may only occur at the configuration level where it is defined. Umbraco's sectionGroup <sectionGroup name="system.web.webPages.razor" type="System.Web

Umbraco 4.6+ - How to get all nodes by doctype in C#?

淺唱寂寞╮ 提交于 2019-11-28 02:39:11
问题 Using Umbraco 4.6+, is there a way to retrieve all nodes of a specific doctype in C#? I've been looking in the umbraco.NodeFactory namespace, but haven't found anything of use yet. 回答1: I was just doing this today, something like the below code should work (using umbraco.presentation.nodeFactory), call it with a nodeId of -1 to get the root node of the site and let it work it's way down: private void DoSomethingWithAllNodesByType(int NodeId, string typeName) { var node = new Node(nodeId);

Setting errorPage in Umbraco

北城余情 提交于 2019-11-27 23:03:43
问题 I am developing a web application using Umbraco. I create a content called PageNotFound and, in the errors section of umbracoSettings.config file, I put the node id of that for 404 error404. The problem is that, with IIS 7, IIS always looks for the HttpErrors section in web.config and does not pay attention to umbracoSettings.config. What should I do? 回答1: In your web.config (system.webServer section) you can tell the site to pass all of the error handling through to the application:

Publishing multiple sites on a single instance of umbraco

做~自己de王妃 提交于 2019-11-27 17:03:12
问题 I am looking to setup a parallel site to one already that already uses umbraco for its content management system. The new site would share admins, templates, macros, and media resources, but not any content. If I setup multiple host headers pointing to the same directory with an umbraco install, how can I switch the top node (home vs home2) of the site based on which url is being accessed? 回答1: I believe you first have to change a setting in umbracosettings.config: <useDomainPrefixes>true<

Failed to load viewstate. The control tree into which viewstate is being loaded

假如想象 提交于 2019-11-27 14:48:24
问题 I am receiving the following error message after an HTTP POST on an ASP.NET form hosted inside a UserControl: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. Here's additional info: I'm running .NET 4.5 RC It

umbraco razor - getting fields from content

[亡魂溺海] 提交于 2019-11-27 03:00:10
问题 I have a 6 items of the same content type "news", in each item I have a field newsIntro. I want to put the fields in specific pages on another page so I need to target a specific field so it may be newsIntro on node 1702. I have tried a few things like @1720.newsIntro how do I target a specific field Thanks 回答1: There are some great resources you should take a look at while you are learning Razor: Umbraco Razor Feature Walkthrough - An eight part blog post series of many of the new Razor