Monthly Archives: October 2013

Javascript define objects with sub objects in single line

var tmp = {sub:{title:’titlex’, alt:’altx’}, viewName:’xxx’};   “sub” is the sub object that has properties, title and alt. ViewName is a property of the parent class.

Posted in Web Development | Tagged , , | Leave a comment

Stop asp.net from encoding the source HTML string (mvc raw html)

/// Stops asp.net from encoding the source HTML string. public static IHtmlString HTMLRaw(string source) { return new HtmlString(source); } call this function whenever you want asp.net NOT to encode the string. Note: You can use <%= and %> tags to … Continue reading

Posted in ASP.Net, C#.Net, Microsoft .Net Framework | Tagged | Leave a comment