Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / MIT / System / Web / UI / MobileControls / Adapters / XhtmlAdapters / XhtmlBasicLinkAdapter.cs / 1305376 / XhtmlBasicLinkAdapter.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System;
using System.Security.Permissions;
using System.Web.Mobile;
using System.Web.UI.MobileControls;
using System.Web.UI.MobileControls.Adapters;
#if COMPILING_FOR_SHIPPED_SOURCE
namespace System.Web.UI.MobileControls.ShippedAdapterSource.XhtmlAdapters
#else
namespace System.Web.UI.MobileControls.Adapters.XhtmlAdapters
#endif
{
///
[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 XhtmlLinkAdapter : XhtmlControlAdapter {
///
protected new Link Control {
get {
return base.Control as Link;
}
}
///
public override void Render(XhtmlMobileTextWriter writer) {
ConditionalClearPendingBreak(writer);
ConditionalEnterStyle(writer, Style);
String cssClass = GetCustomAttributeValue(XhtmlConstants.CssClassCustomAttribute);
String accessKey = GetCustomAttributeValue(XhtmlConstants.AccessKeyCustomAttribute);
RenderBeginLink(writer, Control.NavigateUrl, accessKey, Style, cssClass);
String controlText = Control.Text;
writer.WriteEncodedText(controlText == null || controlText.Length == 0 ? Control.NavigateUrl : controlText);
RenderEndLink(writer);
// ConditionalSetPendingBreak should always be called *before* ConditionalExitStyle.
// ConditionalExitStyle may render a block element and clear the pending break.
ConditionalSetPendingBreakAfterInline(writer);
ConditionalExitStyle(writer, Style);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System;
using System.Security.Permissions;
using System.Web.Mobile;
using System.Web.UI.MobileControls;
using System.Web.UI.MobileControls.Adapters;
#if COMPILING_FOR_SHIPPED_SOURCE
namespace System.Web.UI.MobileControls.ShippedAdapterSource.XhtmlAdapters
#else
namespace System.Web.UI.MobileControls.Adapters.XhtmlAdapters
#endif
{
///
[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 XhtmlLinkAdapter : XhtmlControlAdapter {
///
protected new Link Control {
get {
return base.Control as Link;
}
}
///
public override void Render(XhtmlMobileTextWriter writer) {
ConditionalClearPendingBreak(writer);
ConditionalEnterStyle(writer, Style);
String cssClass = GetCustomAttributeValue(XhtmlConstants.CssClassCustomAttribute);
String accessKey = GetCustomAttributeValue(XhtmlConstants.AccessKeyCustomAttribute);
RenderBeginLink(writer, Control.NavigateUrl, accessKey, Style, cssClass);
String controlText = Control.Text;
writer.WriteEncodedText(controlText == null || controlText.Length == 0 ? Control.NavigateUrl : controlText);
RenderEndLink(writer);
// ConditionalSetPendingBreak should always be called *before* ConditionalExitStyle.
// ConditionalExitStyle may render a block element and clear the pending break.
ConditionalSetPendingBreakAfterInline(writer);
ConditionalExitStyle(writer, 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
- CategoryGridEntry.cs
- OleDbDataReader.cs
- ExpressionTextBox.xaml.cs
- FormViewModeEventArgs.cs
- ListControl.cs
- AnimatedTypeHelpers.cs
- CaseStatement.cs
- JoinSymbol.cs
- XPathBuilder.cs
- SecurityRuntime.cs
- BlobPersonalizationState.cs
- MimeWriter.cs
- FormClosedEvent.cs
- DbModificationCommandTree.cs
- CodeArrayCreateExpression.cs
- ConfigurationLocationCollection.cs
- TripleDESCryptoServiceProvider.cs
- DependencyProperty.cs
- UInt32Converter.cs
- RotateTransform.cs
- FixedSOMLineCollection.cs
- ErrorStyle.cs
- BatchParser.cs
- TypeToken.cs
- Invariant.cs
- HostingEnvironment.cs
- RestHandler.cs
- XmlSchemaException.cs
- ToolStripStatusLabel.cs
- BevelBitmapEffect.cs
- SettingsPropertyWrongTypeException.cs
- FontInfo.cs
- OpenTypeMethods.cs
- CacheAxisQuery.cs
- PageParser.cs
- Positioning.cs
- XmlSchemaAppInfo.cs
- DirectoryNotFoundException.cs
- SystemUdpStatistics.cs
- SaveWorkflowAsyncResult.cs
- ErrorProvider.cs
- BrushValueSerializer.cs
- WebServiceTypeData.cs
- SqlConnectionHelper.cs
- PointConverter.cs
- SafeLocalMemHandle.cs
- WorkflowDispatchContext.cs
- MatrixAnimationBase.cs
- PrintDialog.cs
- WindowsClientCredential.cs
- AuthenticatedStream.cs
- DictionarySurrogate.cs
- StringFunctions.cs
- SchemaNames.cs
- ClientSideQueueItem.cs
- NestPullup.cs
- ConnectionsZoneDesigner.cs
- ComponentCommands.cs
- MultipleCopiesCollection.cs
- WorkflowInstanceProxy.cs
- DbDataRecord.cs
- FixedTextPointer.cs
- DataGridViewAccessibleObject.cs
- DoWorkEventArgs.cs
- TextWriterTraceListener.cs
- ListItemCollection.cs
- TypeToken.cs
- DataBindingCollection.cs
- InputScopeNameConverter.cs
- DoubleAnimationBase.cs
- KerberosTicketHashIdentifierClause.cs
- Unit.cs
- TableItemPatternIdentifiers.cs
- ProfileEventArgs.cs
- SoapFault.cs
- BasicHttpBindingElement.cs
- MsmqDecodeHelper.cs
- Bitmap.cs
- ComponentDispatcher.cs
- ApplicationContext.cs
- SqlCharStream.cs
- ChannelBinding.cs
- FileSecurity.cs
- AtomMaterializer.cs
- AggregateException.cs
- ParameterModifier.cs
- FusionWrap.cs
- CachingHintValidation.cs
- TypeLibConverter.cs
- DataMisalignedException.cs
- IPPacketInformation.cs
- HttpStreamXmlDictionaryReader.cs
- TagPrefixAttribute.cs
- WindowsGrip.cs
- SystemInformation.cs
- Int64AnimationUsingKeyFrames.cs
- MulticastDelegate.cs
- DescendentsWalkerBase.cs
- Application.cs
- UsernameTokenFactoryCredential.cs