1 //------------------------------------------------------------------------------ 2 // <copyright file="HtmlLiteralTextAdapter.cs" company="Microsoft"> 3 // Copyright (c) Microsoft Corporation. All rights reserved. 4 // </copyright> 5 //------------------------------------------------------------------------------ 6 7 using System; 8 using System.IO; 9 using System.Web; 10 using System.Web.UI; 11 using System.Web.UI.MobileControls; 12 using System.Drawing; 13 using System.Security.Permissions; 14 15 #if COMPILING_FOR_SHIPPED_SOURCE 16 namespace System.Web.UI.MobileControls.ShippedAdapterSource 17 #else 18 namespace System.Web.UI.MobileControls.Adapters 19 #endif 20 21 { 22 23 /* 24 * HtmlLiteralTextAdapter class. 25 * 26 * Copyright (c) 2000 Microsoft Corporation 27 */ 28 /// <include file='doc\HtmlLiteralTextAdapter.uex' path='docs/doc[@for="HtmlLiteralTextAdapter"]/*' /> 29 [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 30 [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] 31 [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] 32 public class HtmlLiteralTextAdapter : HtmlControlAdapter 33 { 34 35 /// <include file='doc\HtmlLiteralTextAdapter.uex' path='docs/doc[@for="HtmlLiteralTextAdapter.Control"]/*' /> 36 protected new LiteralText Control 37 { 38 get 39 { 40 return (LiteralText)base.Control; 41 } 42 } 43 44 // calls the more specific render methods 45 /// <include file='doc\HtmlLiteralTextAdapter.uex' path='docs/doc[@for="HtmlLiteralTextAdapter.Render"]/*' /> Render(HtmlMobileTextWriter writer)46 public override void Render(HtmlMobileTextWriter writer) 47 { 48 String text = Control.PagedText; 49 50 writer.EnterStyle(Style); 51 writer.WriteText(text, true); 52 writer.ExitStyle(Style, Control.BreakAfter); 53 } 54 } 55 } 56