SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 259 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

The FancyLabel Style Web Form Code-Behind Class File
using System;
using System.Web.UI.HtmlControls;
namespace ControlsBook2Web.Ch04
{
public partial class FancyLabelStyle : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AddCssLinktoHeader();
if (!Page.IsPostBack)
{
AutoLabel.Cursor = ControlsBook2Lib.Ch04.CursorStyle.auto;
CrosshairLabel.Cursor = ControlsBook2Lib.Ch04.CursorStyle.crosshair;
HandLabel.Cursor = ControlsBook2Lib.Ch04.CursorStyle.hand;
HelpLabel.Cursor = ControlsBook2Lib.Ch04.CursorStyle.help;
MoveLabel.Cursor = ControlsBook2Lib.Ch04.CursorStyle.move;
TextLabel.Cursor = ControlsBook2Lib.Ch04.CursorStyle.text;
WaitLabel.Cursor = ControlsBook2Lib.Ch04.CursorStyle.wait;
}
}
private void AddCssLinktoHeader()
{
HtmlLink cssRef = new HtmlLink();
cssRef.Href = "../Ch04/WebControlStyle.css";
cssRef.Attributes.Add("rel", "stylesheet");
cssRef.Attributes.Add("type", "text/css");
Header.Controls.Add(cssRef);
}
}
}
Figure 4-18 shows what the web form looks like when it??™s rendered.
CHAPTER 4 ?–  THE WEBCONTROL BASE C LASS AND CONTROL STYLES 177
Figure 4-18. The FancyLabel Style web form
The following HTML fragment shows the rendered tags and their style attributes
for the CSS cursor property:













style="cursor:auto;">Auto cursor set




style="cursor:crosshair;">Crosshair cursor set




style="cursor:hand;">Hand cursor set
178 CHAPTER 4 ?–  T HE WEBCONTROL BASE CLASS AND CONTROL S TYLES




style="cursor:help;">Help cursor set




style="cursor:move;">Move cursor set




style="cursor:text;">Text cursort set




style="cursor:wait;">Wait cursor set




id="ctl00_ControlsBookContent_Button1" />

The StyleCollection Class
New in ASP.


Pages:
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6