I'm building a website. It allows the user to edit their website template, so I need a template engine for asp.net web form (I'm using C#). I'm worry about security problem, about user can write some c# code. So any template engine recommended?
Try http://ndjango.org - which is based from Django template - it supports almost all Django template functionality.
http://www.stringtemplate.org/ is also useful although it is very very strict.
i am not sure but perhaps DotNetNuke can be used. http://www.dotnetnuke.com/
Related
Im new to Django CMS and setting up a new project.
Would like to understand how the workflow works? I'm able to succesfully create a page and render it correctly but confused on how the views are created.
If you want custom views then you need to create your own applications which can be hooked in to CMS really easily.
Take a look at the docs; http://docs.django-cms.org/en/release-3.3.x/how_to/apphooks.html
Also, you can see an example of an application which can be integrated into CMS here; https://github.com/nephila/djangocms-blog/tree/develop/djangocms_blog
I have a problem with sitemap localization. Whole app is localized properly but sitemap is not.
I would like to get any error information or know where to put breakpoint to know what is wrong.
I've been using this guide
E:
I forgot to mention that I'm using Kendo MVC Sitemap
Unfortunately it seems that localization of kendo sitemap is not possible at all, and you have to make separate sitemaps for each language ...
Hello: we currently do not use asp.net controls (no web forms). The way we do is:
1> Read HTML file from disk
2> lookup database, parse tags and populate data
finally,
Response.Write(page.ToString());
here there is no possibility of using asp.net controls. What I am wondering is, if we use asp.net controls in those HTML files, is there way to process them during step 2?
Thanks and appreciate your response.
I haven't tried this but you might want to attach the html extension to the ASPNET ISAPI filter in your IIS and in your page, step 2, use Server.Execute and call out that html file. However that page will execute on its own.
If these html pages from step 1 are meant for making up parts of the page that needs to get inserted in parts of the webform (.aspx), I suggest that you make use of master pages instead.
If the html pages are standalone pages that need extra functionality you can simply upgrade them to webforms without codebehind if needed. Custom made macros in Visual Studio can help a great deal in this transition effort.
The project I am working allows users to create pages in a CMS type system.
I would like to use an asp.net sitemap to reference these pages. So when a page is added or moved the Xml sitemap would be updated.
Is this a practical solution and are there any solutions available that work similar to this?
You should probably write your own SiteMapProvider see http://msdn.microsoft.com/en-us/library/ms178431.aspx that loads from your CMS.
Mentioned stackoverflow only as an example, but if you look above the URL for ask is
http://stackoverflow.com/questions/ask
which means /ask is a subdirectory, but they also do this for the specific question pages. How do you code this in .NET?
Not a code question as much as a technique. I know this is great for SEO, but how do you create a site so that every "page" is its own directory? Dynamically.
Do you have a template or a hidden redirect???
How?? :)
It's termed URL rewriting:
Url Rewriting with ASP.NET
MSDN: URL Rewriting in ASP.NET
EDIT: As #Justice points out, StackOverflow uses Routing.
StackOverflow uses something called Routing, which comes with .NET 3.5 SP1. Routing is a popular feature of a number of MVC frameworks, such as ASP.NET MVC, Ruby on Rails, and a number of Python and PHP frameworks.
Stack Overflow was built using ASP.NET MVC which uses a technique called Routing, see:
What Was Stack Overflow Built With?
and Routing
Stack Overflow uses ASP.net MVC
MVC uses the URL + Query String to determine the content, so its not like a URL which points to a specific page, but more like a hierarchical path to the properties of some data to be displayed
E.G. https://stackoverflow.com/users/[Put User ID Here]/[Put User Name Here]
prompts the website to display a USER with an ID specified in the path ( in this case the user name is probably just for kicks ) as opposed to a specific page created just for that user.
I have seen this accomplished by simply creating a folder for every web page and then having each folder contain a Default.aspx document (Assuming Default.aspx is setup as a default document in IIS, which it is by default). Then you can navigate to any folder on the site without specifying the page (Default.aspx).
For the dynamic part, I have worked with CMS systems that do it this way and the Default.aspx page simply inherits from some master template and the CMS system utilizes the ASP.NET rendering enginge to dynamically complete the web page.
Using folders may be a little heavy with the site structure, but it is an easy way to eliminate the page names from the browser.
This is how I structure my website and avoid having to use page names... for example http://www.innovaapps.net/Blog simply brings up the default.aspx page without having to specify the page name.