Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / MIT / System / Web / UI / MobileControls / Adapters / WmlLinkAdapter.cs / 1305376 / WmlLinkAdapter.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System;
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.MobileControls;
using System.Security.Permissions;
#if COMPILING_FOR_SHIPPED_SOURCE
namespace System.Web.UI.MobileControls.ShippedAdapterSource
#else
namespace System.Web.UI.MobileControls.Adapters
#endif
{
/*
* WmlLinkAdapter class.
*
* Copyright (c) 2000 Microsoft Corporation
*/
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[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.")]
public class WmlLinkAdapter : WmlControlAdapter
{
///
protected new Link Control
{
get
{
return (Link)base.Control;
}
}
///
public override void Render(WmlMobileTextWriter writer)
{
String navigateUrl = Control.NavigateUrl;
String text = (String.IsNullOrEmpty(Control.Text)) ? navigateUrl : Control.Text;
bool breakAfter = Control.BreakAfter && !Device.RendersBreaksAfterWmlAnchor;
String softkeyLabel = Control.SoftkeyLabel;
bool implicitSoftkeyLabel = false;
if (softkeyLabel.Length == 0)
{
implicitSoftkeyLabel = true;
softkeyLabel = Control.Text;
}
writer.EnterStyle(Style);
RenderLink(writer, navigateUrl, softkeyLabel, implicitSoftkeyLabel, true, text, breakAfter);
writer.ExitStyle(Style);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataKeyArray.cs
- ListViewItem.cs
- PersonalizationStateQuery.cs
- XmlMembersMapping.cs
- ProcessModelSection.cs
- Baml2006Reader.cs
- ObjectDisposedException.cs
- QueryStringParameter.cs
- BrowserCapabilitiesCodeGenerator.cs
- PeerInvitationResponse.cs
- AspNetHostingPermission.cs
- Context.cs
- SqlInternalConnection.cs
- Int64KeyFrameCollection.cs
- NullableBoolConverter.cs
- TrustSection.cs
- EntityObject.cs
- LogStore.cs
- UnsafeNativeMethods.cs
- BitSet.cs
- ComboBox.cs
- ServiceHttpHandlerFactory.cs
- BinaryParser.cs
- Certificate.cs
- WebBrowserSiteBase.cs
- NameValueCache.cs
- TargetException.cs
- RootCodeDomSerializer.cs
- MessageLogTraceRecord.cs
- ListBindableAttribute.cs
- ProviderCollection.cs
- DictionaryManager.cs
- DataColumn.cs
- DataFormats.cs
- FlatButtonAppearance.cs
- BitmapCodecInfoInternal.cs
- XmlSchemaExporter.cs
- Vector3DKeyFrameCollection.cs
- ChameleonKey.cs
- ByteRangeDownloader.cs
- LazyTextWriterCreator.cs
- SizeAnimationClockResource.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- Point3D.cs
- InArgumentConverter.cs
- WeakReference.cs
- FocusManager.cs
- StaticSiteMapProvider.cs
- SortedSet.cs
- ReaderContextStackData.cs
- NGCSerializer.cs
- DependencyPropertyHelper.cs
- RequestStatusBarUpdateEventArgs.cs
- VirtualizingPanel.cs
- HttpCachePolicyWrapper.cs
- CatalogPartCollection.cs
- JsonReaderDelegator.cs
- MemberMaps.cs
- ColorPalette.cs
- DataProviderNameConverter.cs
- ReferentialConstraint.cs
- AdditionalEntityFunctions.cs
- SendKeys.cs
- oledbmetadatacollectionnames.cs
- TypeLibConverter.cs
- BitmapInitialize.cs
- BaseAsyncResult.cs
- PackUriHelper.cs
- SchemaImporter.cs
- IArgumentProvider.cs
- DataContract.cs
- WebBrowserDocumentCompletedEventHandler.cs
- EntityCommandCompilationException.cs
- ImageDrawing.cs
- PropertyToken.cs
- PrinterResolution.cs
- WebPartHeaderCloseVerb.cs
- Canvas.cs
- PrinterSettings.cs
- Ticks.cs
- StateMachine.cs
- CodeFieldReferenceExpression.cs
- SQLMoneyStorage.cs
- ShutDownListener.cs
- FamilyMap.cs
- StrokeCollectionConverter.cs
- LinkConverter.cs
- GZipObjectSerializer.cs
- SoapTypeAttribute.cs
- XmlIterators.cs
- ListBindingHelper.cs
- ToolStripGrip.cs
- DataRowCollection.cs
- ShapeTypeface.cs
- HealthMonitoringSectionHelper.cs
- MergeFilterQuery.cs
- MultipleViewPattern.cs
- Model3D.cs
- SingleTagSectionHandler.cs
- SurrogateEncoder.cs