How to use it in your WebMatrix web pages ?

In the root of you site , create a folder named APP_CODE and put the provided Csharp classes in it ( LoremIpsum.cs and RandomStringArrayTool.cs)

Within your html code, in a cshtml file , put the following statement :

@Utils.LoremIpsum.generate();

availables options are :

- word number
- number of words in a paragraph
- apply a CSS class ( boolean ) ?
- the name of the CSS class to apply

for instance :

@Utils.LoremIpsum.generate(200,100,true,"myClass");

will generate a 200 words block of 2 paragraphs , and apply a CSS class name myClass on it.

The code is published under MIT license.

http://en.wikipedia.org/wiki/MIT_License

Last edited Oct 7, 2010 at 8:46 AM by camus2, version 2

Comments

No comments yet.