Maximizing.ASP.dot.NET.Real.World.ObjectOriented.Development [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Maximizing.ASP.dot.NET.Real.World.ObjectOriented.Development [Electronic resources] - نسخه متنی

Jeffrey Putz

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Expressions


Expressions are little shortcuts that enable you to declaratively link data to objects in the page. We saw an example of an expression in Listing 13.1 when we passed in the connection string to a SqlDataSource object. The syntax is simple: <%$ prefix: value %>.Listing 13.1, the AppSettings prefix, and the Resources prefix. AppSettings works just like ConnectionStrings, in that it reads a value right out of web.config and passes it into the page. The only difference is that it looks in web.config's <appSettings> element instead of the <connectionStrings> element.

The Resources prefix gets values out of resource (.resx) files. Resource files are generally used to break out the UI elements of an application to allow for easy localization. Under the hood, they're XML files, but they can be edited in Visual Studio as a simple table. Accessing the data of a particular field in the resource file is accomplished with the syntax <%$ Resources: MyResourceFile, MyKeyValue %>, where "MyResourceFile" is the name of the resource file without the .resx extension and "MyKeyValue" is the name of the field from which you want to extract a value.


/ 146