sitecore webpage shows old content which is not present in .net mvc view.I don't want to show that content on web page - asp.net-mvc

I am creating page in sitecore.It shows previously published content on page which is now not present anywhere in code.I want to remove that content.Also it does not show header and footer even I give correct placeholder name from layout file.

There might be few possible reasons for it, which you need to verify in your cms to fix this issue:-
1: You might added Sitecore level caching, verify below points in CMS.
i) Sitecore Rendering level cache.
ii) Sitecore page Presentation level cache.
iii) Code level caching
2: Do IIS reset with the below command in CM:-
CMD Window> iisreset

Related

views are no published since I add custom elements for Identity

I'm using the asp mvc template with dotnet core 6 preview 3.
Since I update to preview 3 (from preview 2) views are no longer published when I publish the site. Not better with preview4. Even from a fresh template Views are not published.
The directories Views and Areas are not even present in the publication.
There is no views.dll generated, and when I upload the publication to a sever I get a blank page when connecting to the site. In event viewer there is an error saying that index.cshtml can't be located.
I just can't imagine where to look for. Right now I copy and paste the Areas and Views directories to the server. I'm sure there is better to do.
----- EDIT 1
To restore my project behavior I had to add the following lines to my csproj:
<PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>

How to find unused items in the Content folder in Umbraco

I'm setting up a new Umbraco site to replace an older ASP.Net site.
The old site is riddled with old content that isn't linked to anymore. I want to prevent the same thing from happening on the new Umbraco site.
Is there a good way of finding unused items in Umbraco's Content folder (not Templates or Document Types)?
If that's not feasible, is there a way to keep content owners from creating a bunch of content pages and abandoning them instead of deleting them?
It's an interesting question, but from an SEO point of view an old page of content has plenty of power & I wouldn't delete it if possible.
I don't know of an umbraco package that will tell you which pages don't have links - but Google will tell you. If you want to know what links to www.example.com/oldpage.html then type the following into Google:
link:www.example.com/oldpage.html
(https://support.google.com/webmasters/answer/55281?hl=en)
I wouldn't delete old content (unless it is now plainly wrong) I'd keep all the old content & tidy it away:
Create a folder under home called something like 'archive'
Move all your dead content there
Use a 301 redirection package or change urlrewriting.config in case there are any external links to these dead pages as the old urls will now return 404 errors
Make sure that the sitemap contains links to these new archive pages
You will now have cleaned up the structure, but without losing any SEO value.

Kendo drop down list doesn't work in IE10 iframe

My mvc website makes use of the Telerik Kendo mvc dll's. However the problem is that the drop down list doens't work when running it on IE10, in a website that uses frames. When I run it on its own, it works fine, however as soon as it is used on a website with frames, it brakes the drop down list and they won't expand.
I'm currently using the latest version (2012.913) of the Kendo UI for MVC.
Is there a solution for this.?
I know this is an old post, but I thought I'd share since we had the same issue and found the fix for it. Unfortunately we are forced to continue using frames as well, so we had to put this fix in place.
First thing to check is if your using compatibility mode in the browser, whether by the site being added to the compatibility list or you're on an intranet site. If you can, disable compatibility mode and that should resolve this. If you want to ensure your site isn't using compatibility mode, add this tag to your application.
The problem we had is that IE doesn't obey this setting when using frames...it will always use whatever the parent frame is set to. We had to have compatibility mode enabled for certain portions of our site, so we were in a catch-22 situation. Since there's no way around this, our final resolution was to re-direct the user behind the scenes if they navigated to the page in the iFrame.
That being said, the easiest option is to add the meta tag above if you don't need compatibility view for anything.

ReportViewer in MVC 4 partial

I am still unsure the best way to go about it.
I've read alsorts of resources, yet still no closer to a working solution.
I created a partial ASCX file. Added Report viewer to it, then rendered said partial in my CSHTML file. This was the closest I have come. In that I can see the report viewer, buttons etc. But for some reason the data never shows.
I have tried ASPX page inside an IFrame But this is not the way I want to go, about making this solution work.
Loading an ASPX page outright. But I lose my _Layout.cshtml main page style.
Some people suggest changing all sorts of things in config / Global.asax where as some say its not even necessary.
Ideally I want to have it as a partial in a page. But can deal with it being the only thing on the page, if I keep my main layout.
My experience with the older syntax / pages / non-MVC is limited to this project - trying to get this to work.
My data is linked through the components setup. The connection works fine in aspx page, as single page or iframe. But not in ascx.
The ReportView control requires ViewState to be enabled. In ASP.NET MVC such notion no longer exists. This means that you cannot use this control inside a native ASP.NET MVC view or partial. You can use it only in a classic WebForm (not in an ASP.NET MVC View) and the embed this WebForm inside an iframe within your current ASP.NET MVC view or partial. You have the possibility to render the report as an image for example and directly stream it to the response without using this control. Here's a blog post which illustrates the technique. So you could have a controller action which generates the report as a JPEG image and then link to this controller action from your view using the <img> tag. Unfortunately this makes only a static copy of the report and the user cannot interact with it.
You might also checkout this blog post which illustrates how you could run ASP.NET MVC and classic WebForms side by side.

Master Pages - Sharepoint 2007

I have created a Master Page in Sharepoint 2007. I am having difficulty with the main content. I have tried putting the content into the PlaceHolder Main but the content will not render on the page, the content consists of images (which I will eventually link to other pages). If I go outside the PlaceHolder and create a div and div id and connect the div id to my css it will render on the master page. That brings up a totally different issue, not only do the images render on the master page, but they also show up in all of my document libraries.
I have spent many hours trying to figure this out. I do not want to change any application pages. I have tried to apply the changes to the master page and not the rest of the site, I could not get that to work. I have tried moving the content to different Placeholders and the images still render in the libraries. Someone please help me to understand why the images from the master page show up in all of the document libraries. I would really really appreciate it.
Thank You.
Standard ASP.NET page generating at work here. The content in the master page content zone is replaced with the content in the page layout content zone. Without changing the application page you are stuck.
It sounds like you should be editing the application page anyway (because you don't want it to appear in all document libraries)

Resources