Surface Roadshow at Carindale
When I did my shopping at Westfield Carindale, I found there was a roadshow for Microsoft Surface. That was interesting! In front of the counter, there was a Christmas Tree which is made of Surface. That sounds very geek! Beside that, there is something real! There were a few surface 2 and surface pro 2. I tried a surface pro2! That is cool! It has Windows 8.1, not the RT version! Moreover, it has a touch cover, which has a physical netbook size keyboard. That is better than surface which has only a soft keyboard. I think if I have money, I will buy that as a chirstmas present for myself!
Singleton in C#
To implement Singleton Pattern in C#, that is easy. I like to static class. For example:
Code
public static class GobalData | |
{ | |
public static Group Group {get;set;} | |
} |
HOWTO: Find a Physical Path in ASP.Net from URL
In a number of situations, we need to know a Physical Path in a server from URL. For example, we need to upload some photo. Thus, this is a very common task, and is very easy to do in C#
Code
string serverPath = Server.Map("~/Photo"); // e.g. it returns "C:\site\Photo" |
ADO.Net is still being used
I am still using ADO.net and very simple applications. ADO.net is more flexible. I got more control to translate sql into objects for the presentation. Moreover, for simple applications, that is too much for using LINQ or other ORM. This is a bit over kill. I still recommend you to consider to use ADO.net, that is classic and useful!
Umbraco Contact Us Form
I am started to use Umbraco. But I found there is no form engine. I cannot create a contact form without coding. But I found there is a good contact form package, Cultiv Razor Contact Form. That is easy to use too.
You just need to this line into your template:
Code
<umbraco:Macro FileLocation="~/macroScripts/CultivContactForm.cshtml" MailFrom="[email protected]" runat="server" /> |