Tuesday, February 21, 2012

Saturday, February 4, 2012

IZWebFileManager now speaks in more languages

Recently I got a contribution from BeJay, one of IZWebFileManager users. It was 3 new language resource files: China, Czech  and Slovakia.

So by now IZWebFileManager supports 17 languages! Isn't it great?

Most recent release available for download from google code: http://code.google.com/p/izwebfilemanager/

IZWebFileManager is an open source project. You are welcome to contribute!

Monday, November 14, 2011

Use ASP.NET Resource strings from within javascript files

It seems to be a common issue.

ASP.NET allows you to use resource files (*.resx) to localize content of pages (or views, if we are in context of ASP.NET MVC). All what you need is to put resource files under ~/App_GlobalResources folder and use either resource expression or  HttpContext.GetGlobalResourceObject() API to get a proper string. It is well documented on MSDN. The only issue - this API is not accessible within static resources such JavaScript files.


Monday, August 1, 2011

Write custom ASP.NET HTTP Handler using JavaScript

JavaScript is extremely popular language and already has implementations for server-side programming. For example Node.js  - a server-side JavaScript environment that utilizes Goggle's V8 JavaScript Engine.


I am an ASP.NET developer and want to use JavaScript in the ASP.NET environment. I found Javascript .NET project, that bring Google's V8 to the .NET world and I started with a simple task - to write a custom ASP.NET HTTP Handler using JavaScript. (I had done similar task with IronPython before)


Monday, July 18, 2011

Week picker using jQuery UI Datepicker

There is my implementation of Week picker using jQuery UI Datepicker (requers jQuery UI 1.8+).



Thursday, July 14, 2011

ASP.NET Web Pages and FormAuthentication.LoginUrl configuration

Recently I had integrated ASP.NET Web Pages into existing ASP.NET Web Forms site.
It was classic Web Forms project uses most of ASP.NET Web Forms features.

And of course it uses the built-in FormAuthentication. See Web.config:



Any time you access 'secure' url, you get redirected to Login.aspx with ReturnUrl parameter. This worked fine for years.

Sunday, July 10, 2011

ELMAH - Logging errors in ASP.NET

Catching and logging unhandled exceptions is one of the first tasks in developing an ASP.NET application.

Typically you put code which handles exceptions into Global.asax:

 


The are many ways to report an error: you may write it into a database, send an email or store it in memory.  I got tired of copying such code from one app to another and finally found a component that allows me to handle errors in a code-less way. It is ELMAH