Can app_offline.hml be localized? - asp.net

We can use app_offline.html as a landing page for the period of a maintenance work. But is it possible to localize this page?

As far as I know and can think of, it is not possible to have localized versions of the app_offline page.
Asp.net is only looking for that page to bring the site down and since it is a static page there is not much options.
Simplest approach would be to display a page with the content in all languages. This is not very elegant but would be simple and efficient especially if the content is short and you only have few languages.
If you have too many languages and/or content is too large, you could also have several div each with the translated content and display the correct div by doing language detection in JavaScript.
If you want/need to have a more sophisticated solution, you could look at JavaScript Localization frameworks (l10n.js or l20n.js) to achieve the same thing.
If you go that route, remember that you will need another website to host all the necessary JS and resource files.

Related

Techniques in making site easily copyable to MS Word

This is kind of an odd question and I didnt know where to post it, but here it is.
I have an ASP .Net website used by internal company employees. The site pages are pretty basic and has various tables, divs, css and some sprinkles of javascript/jQuery.
Some of the site pages are often used for presentations. And sometimes, the users need to copy the content offline.
I got a request that when trying to copy certain pages off IE/Firefox and onto Word/PowerPoint, it does not carry the layout over correctly. Well, I know obviously why this is a problem but the users dont and are asking to make it possible.
I'm assuming that the easiest way to do this is have a "printable" view. But as some of these pages are still being developed, are there some techniques we could follow that would make these pages somewhat copyable to word/ppt?
There are online guides to doing this like this one.

css vs dreamweaver templates

what is the difference in performance between css templates and dreamweaver templates , or are they the same. Need to know which one gets indexed quicker by google.
I want to move my website to one the best templates for quick uploads and ftp linkups with linkmanagement tools
please advise
thanks
This is why I despise Dreamweaver and the alike...
Dreamweaver creates websites, which consist of HTML and CSS code, and maybe some JavaScript.
HTML: the "glue". It's the structure which browsers read.
CSS: the "perty stuff". It's what browsers read to determine how to make your page look (colors, layout, etc.).
Since Dreamweaver makes websites, a Dreamweaver template also helps Dreamweaver to make websites, which implies that it follows the above structure.
Templates just style your site and might provide some basic functionality, so they have nothing to do with uploads. Some might be bloated and cause slow loading times, but that's dependent upon the template.
In the end, Dreamweaver Template is more or less CSS + HTML.
A DW template file helps to isolate parts of your HTML code on a page/page basis. Editable content and "locked" content together (in hopes of making development quicker). If you like DW, and have a template you like - 0use it. But don't expect that to be your silver bullet.
There's no advantage to either template where search engines are concerned (good/bad content withstanding).
Content...(pertinent content) is what Google is after. Having a 1M file of valid content will beat a 200k file of sparse/bait-n-switch content every time (well, it's supposed to, right?).
The answer you are looking for: Every Dreamweaver template is a CSS+HTML template. So it depends on the CSS template you are using. For the most part Dreamweaver is pretty bad about writing optimal CSS and it also uses inline styles which is bad for performance.
The real answer: It is obvious you are a beginner and don't know how silly your question is, it is not even one question, and is open ended and has no answer. There is no such thing as a CSS template, CSS by itself is not enough to create a template and this is just a marketing word to use to sell templates to people looking for such a thing as a better alternative to HTML templates, and etc, there is CSS for a certain type of template or certain Document Object Model, so if that is your definition of a CSS template than every Dreamweaver Template is a CSS template, as Dreamweaver itself is not a web technology or language. Dreamweaver is a WYSIWYG/IDE that helps you to write CSS (and other code) without knowledge of CSS, or in my case I use it because I love the pink/purple syntax highlighting it has for CSS in code view.
*Need to know which one gets indexed quicker by google - FTP Upload - linkmanagement *
This has nothing to do with your question, you can create a website in notepad that gets better SEO results. You are mixing all these different concepts together, SEO, CSS, HTML Templates, google indexing,templates, quick uploads, ftp linkups, linkmanagement tools, these are all different concepts and each require years of experience for you to achieve this. At the end of the day what I am trying to tell you is, building a website as you describe is not a few clicks to create a template with dreamweaver. You first need to learn enough to be able to ask the right questions. And then you will be able to create such a website, not the best and ultimate "templates for quick uploads and ftp linkups with linkmanagement tools" but something that works, even though I'm not sure what exactly you are trying to build.
I Think you should look into a CMS like WordPress and get a nice looking wordpress template for your site and eventually become more familiar with these concepts. WordPress has a really good SEO/(google indexing as you say) that it even gets better results than expensive websites built by professionals. This is definitely what you want! trust me!
http://wordpress.org/

Using a Template for Web Page

We have a fairly large public website and have recently redsigned it with a new layout. The problem now is that with our redesign we find ourselves constantly hardcoding the html layout for all of our pages. This is clearly not the best solution.
My question is what are some options on ways to share/inherit, in a sense, a web template that all our ASP.Net projects can pull from for the layout. Specifically the HTML side of the layout. Any changes made to this template will update all web sites that use it. I'm sure this exists but do not know how to approach it.
Master Pages is what you are looking for. See: http://www.asp.net/master-pages/tutorials
or http://www.asp.net/master-pages/tutorials/creating-a-site-wide-layout-using-master-pages-vb
That's the technical solution. Oftentimes, the bigger challenge in retrofitting sites that were built with numerous one-offs is determining which parts of your pages belong in the master page or content areas. Keep in mind that you can have multiple content areas and you can provide default content in a master page that can later be overriden in a content page. It's very flexible. Have fun!
The simplest approach I know is to create a header and footer file for every page. Include the header just after the <body> tag and the footer just before </body>. You content goes in between.
I prefer a more sophisticated approach with a templating system like Smarty, but that's PHP. I don't know what your ASP options are.

Customizing GraffitiCMS

I downloaded GraffitiCMS the other day(now open source and free), and like a lot of what I see, but what I really want to use it for, is to add CMS capabilities to an existing asp.net database/application.
Without getting bogged down with all the details of my app, can someone give me the basic 'approach' that should be taken to add custom content to Graffiti; content that won't be a 'post'?
I've seen for example, how to add custom-widgets to Graffiti - basically inherit from the widget class, compile your dll and plop it into the correct directory and it becomes part of the system. Is there a way to do something similar for the main content areas?
For simplicity sake, pretend I have a non-graffiti database with gig's of data that I want to display on the website using standard asp.net grid's and forms. I realize I could just go in and hack apart the source code to integrate my existing app, but that is likely not the correct approach.
Not looking for a complete solution her, just a pointer and what areas to investigate...thanks.
If you check out the latest source of Graffiti (or the 1.3 branch that was recently created), support was added to put widgets anywhere you want on any page. There is a new chalk function - $macros.Widget - that provides you with this ability. Dan Hounshell wrote a blog post on how you can use this new functionality:
http://danhounshell.com/blog/graffiti-cms-1-3-add-a-widget-anywhere-in-a-view-with-new-widget-macro/
If you're looking for something different than that, just let me know - we're working to make Graffiti even better for situations just like you are currently in.
What we have done to be able to integrate Graffiti CMS with our current ASP.NET projects is to create a post in Graffiti called "hidden" and then with our standard .ASPX pages we call a class in our Render Override that pulls the "hidden" post (ie: site.com/hidden/) and uses the header and footer to wrap the Graffiti theme around our custom .ASPX page. We use some HTML comments in the "hidden" post to be able to parse the header and the footer. It is kind of a hack, but has worked out really well for us.
I think you're trying to put the cart before the horse - depending on the size and amount of functionality, I would be looking to rebuild it after learning the development platform of my CMS system of choice.
I'm pretty much in the same boat right now. I have avoided Graffiti because I have to learn "Chalk" (whatever that is) and Umbraco (using XSLT for layouts is retarded). So far, this leaves me with Sitefinity at the top of my list and Telerik have just pulled the free version!
I may end up grabbing a very basic CMS which is easier to customize. I know this doesn't directly answer your question, but it may give you some food for thought :-)

ASP. NET Master pages - do you use them?

I'm learning ASP.NET using a great Sitepoint book, and I'm also learning more about CSS. I'm undecided on how useful Master Pages are. Could someone let me know whether the real world use mater pages - and if they don't what do they do?
Cheers
Mike
Yes, we absolutely use them.
Typically you will use master pages to handle your header, footer and navigation sections that are consistent through-out all the pages in your website.
This follows the DRY principle of not having to repeat yourself when creating new web forms.
MasterPages are the best feature that came with ASP.NET 2.0.
I use them whenever I can. They simplify your maintenance and management on a website. With a one change you can change whole site.
I always use master pages. It helps keep the code for each page less cluttered, and as previously stated, it lessens the need to repeat yourself.
Speaking of CSS, I use CSS to style the master pages, and set text formating "rules", while I usually end up styling graphics in each individual aspx/ascx-file. I find this less confusing, as you'll otherwise end up with one massive CSS-file - which is hard to keep structured - or a myriad of CSS-files - which often get hard to keep track of.
We use Masterpages for many of our applications and find them a benefit but I think your right to question how useful they are.
For our applications that have a large number of pages it's great to be able to extract a lot of the style information to one place. I know it's possible with include files etc but as Masterpages are the main method for Visual Studio it's obviously integrated very well and easy to use.
The biggest benefit for me is that I tend to use the same Masterpage across many applications thus giving them all the same look and feel. Again I know this can be achieved in other ways but it's Visual Studio integration makes it the easiest for us.
I think the best way for you to decide is to try them and try an alternative method as well. Pick your favorite and then let us all know!
Master pages are absolutley crucial to any ASP.Net application. They are the building blocks for your site.
And if you ever start looking at SharePoint they are the underpinning of all customisation and branding.
Why would you think otherwise? I am interested to know why you might not have thought them as useful.
I've had a solution delivered without master pages, and its a real pain trying to change the layout of the page, as each page has to be changed individually.

Resources