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
- AttributeExtensions.cs
- MouseGesture.cs
- DetailsViewUpdatedEventArgs.cs
- GregorianCalendarHelper.cs
- DataGridCellsPanel.cs
- ReturnEventArgs.cs
- EventsTab.cs
- OracleTimeSpan.cs
- RefreshPropertiesAttribute.cs
- NotFiniteNumberException.cs
- TreeViewEvent.cs
- SystemIcmpV6Statistics.cs
- NopReturnReader.cs
- PerformanceCounterPermission.cs
- DataServiceHostFactory.cs
- ManagedFilter.cs
- PropertyRef.cs
- ToolboxComponentsCreatingEventArgs.cs
- EditorZone.cs
- AssemblyAssociatedContentFileAttribute.cs
- PropertyChangedEventArgs.cs
- ItemDragEvent.cs
- XmlNamespaceMappingCollection.cs
- WorkflowStateRollbackService.cs
- DataListItem.cs
- ServicesSection.cs
- MeasureItemEvent.cs
- PrimitiveXmlSerializers.cs
- DetailsViewDeletedEventArgs.cs
- SecurityException.cs
- FocusManager.cs
- ObjectAnimationBase.cs
- TreeNodeCollection.cs
- DataListItemCollection.cs
- WebPartAuthorizationEventArgs.cs
- Attributes.cs
- ValidatorCompatibilityHelper.cs
- SemanticBasicElement.cs
- Rect3D.cs
- GiveFeedbackEventArgs.cs
- GradientStop.cs
- SimpleRecyclingCache.cs
- SqlClientMetaDataCollectionNames.cs
- IndentTextWriter.cs
- BrowserDefinitionCollection.cs
- ObjectStorage.cs
- MergeLocalizationDirectives.cs
- DbModificationClause.cs
- FileDialog.cs
- DelegatedStream.cs
- sqlser.cs
- Point3D.cs
- ProgressBar.cs
- ReadingWritingEntityEventArgs.cs
- FlowDocumentScrollViewer.cs
- PeerChannelFactory.cs
- PackageDigitalSignatureManager.cs
- ClientType.cs
- Ops.cs
- CommandManager.cs
- GrammarBuilderWildcard.cs
- ListViewSortEventArgs.cs
- DataGridViewTopLeftHeaderCell.cs
- XmlSubtreeReader.cs
- WindowsPen.cs
- OdbcHandle.cs
- ListItemConverter.cs
- _ConnectOverlappedAsyncResult.cs
- SystemKeyConverter.cs
- ZipIOExtraFieldElement.cs
- CheckableControlBaseAdapter.cs
- FamilyMapCollection.cs
- Synchronization.cs
- SystemWebSectionGroup.cs
- EntityContainer.cs
- serverconfig.cs
- AuthenticationException.cs
- Rijndael.cs
- AddInProcess.cs
- BufferBuilder.cs
- DataGridViewCellStyle.cs
- SlipBehavior.cs
- BinaryObjectWriter.cs
- EmptyCollection.cs
- BitmapEffectInputData.cs
- ValidatedMobileControlConverter.cs
- HeaderedContentControl.cs
- AuthenticationModulesSection.cs
- AffineTransform3D.cs
- XPathNavigator.cs
- MILUtilities.cs
- PointHitTestParameters.cs
- ClrPerspective.cs
- GlobalizationAssembly.cs
- DataControlFieldTypeEditor.cs
- ExternalFile.cs
- _FtpDataStream.cs
- ObjectStateManagerMetadata.cs
- AffineTransform3D.cs
- GetWorkflowTree.cs