Jack
Jack

Reputation: 177

ASP.net bind expression

I am looking into some code in a open source ASP.net web app - NopCommerce. There is a binding expression in the tag that I never seen before. Can someone tell me what it is? How does this loginbutton get fired with out the "onclick" attribute? Where can I find the source code class in the Solution?

Thanks

<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="<% $NopResources:Login.LoginButton %>

Upvotes: 0

Views: 572

Answers (1)

bigtlb
bigtlb

Reputation: 1572

This is using ASP.Net Expressions, usually used for Connection Strings and implicit resource binding.

http://msdn.microsoft.com/en-us/library/d5bd1tad.aspx

They can be customized and extended. In this case, the application (NopCommerce) has a custom resource builder:

http://www.nopcommerce.com/boards/t/2264/difference-between-getlocaleresourcestring-and-nopresources.aspx

Upvotes: 2

Related Questions