Thursday, June 16, 2011
HTML5 Support for the Visual Studio 2010 Editor
Folks have been asking "When will VS2010 support HTML5?" I've been saying, jokingly, that the answer is "yesterday" as there's nothing keeping you from creating HTML5 in Visual Studio or ASP.NET today. However, there's no intellisense and there's lots of squiggly lines that make people uncomfortable. Combine all that with the fact that HTML5 is a moving target, and it's unclear. We've said before that the next version of Visual Studio will have better support HTML5, but what about today?
HTML5 Support for the Visual Studio 2010 Editor
HTML5 Support for the Visual Studio 2010 Editor
Wednesday, June 15, 2011
How to use ASP.NET Expression to set property in server control?
ASP.NET
expressions are a declarative way set control properties based on information
that is evaluated at run time.
<asp:Label id="label1"
runat="server" text="<%$ Resources: Messages, ThankYouLabel
%>" />
<asp:Literal
runat="server" text="<%$ AppSettings: copyright %>"/>
ASP.NET Expression Builders
http://weblogs.asp.net/infinitiesloop/archive/2006/08/09/The-CodeExpressionBuilder.aspx
[ExpressionPrefix("Code")]
public class CodeExpressionBuilder : ExpressionBuilder {
public override CodeExpression GetCodeExpression(BoundPropertyEntry entry,
object parsedData, ExpressionBuilderContext context) {
return new CodeSnippetExpression(entry.Expression);
}
}
<compilation debug="true">
<expressionBuilders>
<add expressionPrefix="Code" type="Infinity.Web.Compilation.CodeExpressionBuilder"/>
</expressionBuilders>
</compilation>
And to see it in action:
<asp:CheckBox id="chk1" runat="server" Text="<%$ Code: DateTime.Now %>" />
Subscribe to:
Posts (Atom)