Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / AdRotatorDesigner.cs / 1 / AdRotatorDesigner.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls { using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Web.UI.WebControls; using Microsoft.Win32; using System; using System.IO; using System.Web.UI; using System.Reflection; ////// /// [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)] [SupportsPreviewControl(true)] public class AdRotatorDesigner : DataBoundControlDesigner { ////// Provides design-time support for the ////// web control. /// /// /// public override string GetDesignTimeHtml() { AdRotator adRotator = (AdRotator)ViewControl; StringWriter sw = new StringWriter(CultureInfo.CurrentCulture); DesignTimeHtmlTextWriter tw = new DesignTimeHtmlTextWriter(sw); // we want to put some properties on the link, and some on the image, so we // create temporary objects for rendinger and distribute the properties. HyperLink bannerLink = new HyperLink(); bannerLink.ID = adRotator.ID; bannerLink.NavigateUrl = ""; bannerLink.Target = adRotator.Target; bannerLink.AccessKey = adRotator.AccessKey; bannerLink.Enabled = adRotator.Enabled; bannerLink.TabIndex = adRotator.TabIndex; bannerLink.Style.Value = adRotator.Style.Value; // VSWhidbey 325730 bannerLink.RenderBeginTag(tw); Image bannerImage = new Image(); // apply style copies most style-related properties bannerImage.ApplyStyle(adRotator.ControlStyle); bannerImage.ImageUrl = ""; bannerImage.AlternateText = adRotator.ID; bannerImage.ToolTip = adRotator.ToolTip; bannerImage.RenderControl(tw); bannerLink.RenderEndTag(tw); return sw.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved./// Returns the design-time HTML of the ////// web control ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpChannelHelpers.cs
- TypeForwardedToAttribute.cs
- ParameterElement.cs
- CroppedBitmap.cs
- CodeGenerationManager.cs
- SchemaElement.cs
- DifferencingCollection.cs
- XmlSchemaAnnotation.cs
- URLMembershipCondition.cs
- Literal.cs
- HtmlImage.cs
- SqlBinder.cs
- TextParagraphProperties.cs
- PagesSection.cs
- RNGCryptoServiceProvider.cs
- WindowsPen.cs
- MSAAEventDispatcher.cs
- COM2Properties.cs
- TcpHostedTransportConfiguration.cs
- FacetChecker.cs
- UxThemeWrapper.cs
- InvalidateEvent.cs
- StringResourceManager.cs
- ScrollEventArgs.cs
- StaticSiteMapProvider.cs
- TableLayoutRowStyleCollection.cs
- OciEnlistContext.cs
- RTLAwareMessageBox.cs
- RelatedEnd.cs
- ItemAutomationPeer.cs
- ParameterModifier.cs
- DataControlLinkButton.cs
- CopyNamespacesAction.cs
- Block.cs
- EntityDataSourceView.cs
- GridViewItemAutomationPeer.cs
- DbConnectionPoolGroupProviderInfo.cs
- ExpressionSelection.cs
- Baml2006KnownTypes.cs
- SqlDataSourceFilteringEventArgs.cs
- BitmapEffectDrawingContent.cs
- HashHelpers.cs
- DataSourceProvider.cs
- ReaderWriterLockWrapper.cs
- mansign.cs
- X509PeerCertificateAuthentication.cs
- KoreanCalendar.cs
- ViewCellRelation.cs
- BookmarkNameHelper.cs
- TextCollapsingProperties.cs
- SqlCommandBuilder.cs
- BridgeDataRecord.cs
- ButtonField.cs
- ToolStripSeparator.cs
- MaskedTextBoxTextEditor.cs
- ChangeConflicts.cs
- ClientBuildManagerCallback.cs
- COM2PropertyDescriptor.cs
- PathTooLongException.cs
- CqlParser.cs
- SystemThemeKey.cs
- ProgressBarBrushConverter.cs
- DataGridViewRowPrePaintEventArgs.cs
- CodeArrayIndexerExpression.cs
- PrincipalPermission.cs
- TransformerInfo.cs
- ResolvedKeyFrameEntry.cs
- UriParserTemplates.cs
- Soap12ProtocolImporter.cs
- DesignerTransaction.cs
- base64Transforms.cs
- InkSerializer.cs
- XNameConverter.cs
- ProvidePropertyAttribute.cs
- InputScope.cs
- MultipartIdentifier.cs
- CustomActivityDesigner.cs
- Pair.cs
- TCPListener.cs
- ResXDataNode.cs
- RepeaterItemEventArgs.cs
- XmlEntity.cs
- DataContractSerializerSection.cs
- DependencyPropertyDescriptor.cs
- ParallelEnumerableWrapper.cs
- ImageDrawing.cs
- EntityDataSourceStatementEditorForm.cs
- LogWriteRestartAreaAsyncResult.cs
- ToolStripMenuItem.cs
- RecognizerBase.cs
- Container.cs
- _ContextAwareResult.cs
- TextChange.cs
- WebPartDescription.cs
- ClientConfigurationHost.cs
- BufferBuilder.cs
- GeometryGroup.cs
- TableNameAttribute.cs
- VirtualizedItemProviderWrapper.cs
- DecodeHelper.cs