Click here to Skip to main content
15,881,173 members
Articles / Web Development / ASP.NET

Conversion of Reporting Starter Kit to use Mono/MySQL

Rate me:
Please Sign up or sign in to vote.
3.69/5 (9 votes)
1 Oct 20053 min read 28.3K   411   32  
A porting of the ASP.NET reporting starter kit to use Mono, MySQL and Apache on a Linux system.
<html><head><link rel=stylesheet href=style.css></head><body><div class=SourcePanel style='font-size:12'><pre style='background-color:white'>
&lt%@ Import Namespace="System" %<font color= "blue">&gt</font>
&lt%@ Import Namespace="System.Threading" %<font color= "blue">&gt</font>
&lt%@ Import Namespace="System.Globalization" %<font color= "blue">&gt</font>

<font color= "blue">&lt</font><font color="maroon">script</font> language="C#" runat="server"<font color= "blue">&gt</font>
<font color= "blue">    protected void</font> Application_BeginRequest(Object sender, EventArgs e)
<font color= "blue">    </font>{
<font color= "green">        // For each request initialize the culture values with</font>
<font color= "green">        // the user language as specified by the browser.</font>
<font color= "blue">        try</font> 
<font color= "blue">        </font>{
<font color= "blue">            </font>Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Request.UserLanguages[0]);
<font color= "blue">        </font>}
<font color= "blue">        </font>catch(Exception) 
<font color= "blue">        </font>{
<font color= "green">            // provide fallback for not supported languages.</font>
<font color= "blue">            </font>Thread.CurrentThread.CurrentCulture = new CultureInfo("en-us");
<font color= "blue">        </font>}
<font color= "blue"></font>
<font color= "blue">        </font>Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
<font color= "blue"></font>
<font color= "green">        // This statement causes all future currency values displayed by the application </font>
<font color= "green">        // to use "$" as the currency symbol regardless of the current culture.</font>
<font color= "blue">        </font>CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol = "$";
<font color= "blue">    </font>}
<font color= "blue">&lt/</font><font color="maroon">script</font><font color= "blue">&gt</font>

</pre>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions