Code:
/ FX-1434 / FX-1434 / 1.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
- CompareInfo.cs
- InvokeWebService.cs
- DrawingContextWalker.cs
- ChildTable.cs
- ServiceOperationUIEditor.cs
- HtmlControlAdapter.cs
- StreamDocument.cs
- UTF32Encoding.cs
- PeerNeighborManager.cs
- PeerName.cs
- AppearanceEditorPart.cs
- Figure.cs
- XmlUtil.cs
- WizardStepBase.cs
- TableCell.cs
- SelectionHighlightInfo.cs
- WebPartCloseVerb.cs
- CssStyleCollection.cs
- StatusBarItemAutomationPeer.cs
- FlowchartDesignerCommands.cs
- Animatable.cs
- DataTemplateSelector.cs
- TemplateControlCodeDomTreeGenerator.cs
- StructuralCache.cs
- Overlapped.cs
- CodeTypeParameter.cs
- ContactManager.cs
- mediaeventshelper.cs
- XPathBinder.cs
- PersonalizationStateQuery.cs
- SchemaEntity.cs
- BinHexDecoder.cs
- InstanceDataCollection.cs
- ActiveDocumentEvent.cs
- URLString.cs
- XmlCharCheckingReader.cs
- EditorZoneDesigner.cs
- ListCommandEventArgs.cs
- LayoutDump.cs
- RsaSecurityTokenAuthenticator.cs
- NativeMethods.cs
- NativeCppClassAttribute.cs
- SymLanguageVendor.cs
- ConfigurationLocation.cs
- BaseCodeDomTreeGenerator.cs
- ValueChangedEventManager.cs
- TemplateBindingExtension.cs
- SamlAudienceRestrictionCondition.cs
- RelativeSource.cs
- XmlDownloadManager.cs
- GenericTextProperties.cs
- HelpEvent.cs
- SHA1Managed.cs
- CollectionViewGroupInternal.cs
- HotSpot.cs
- Mouse.cs
- DSASignatureFormatter.cs
- EasingFunctionBase.cs
- BasicCommandTreeVisitor.cs
- ConfigurationPermission.cs
- TypeValidationEventArgs.cs
- ConfigXmlAttribute.cs
- NumberFormatter.cs
- XmlSchemaValidator.cs
- BitmapData.cs
- RelationshipEndMember.cs
- ListItemConverter.cs
- CreateUserWizardStep.cs
- ContextMenu.cs
- RecommendedAsConfigurableAttribute.cs
- ChangeNode.cs
- SmtpFailedRecipientException.cs
- DesignerUtility.cs
- SQLConvert.cs
- UserMapPath.cs
- EmbossBitmapEffect.cs
- HandledMouseEvent.cs
- UInt16Storage.cs
- AutomationFocusChangedEventArgs.cs
- XmlnsDefinitionAttribute.cs
- FormatterConverter.cs
- CounterSetInstance.cs
- SqlCacheDependencyDatabaseCollection.cs
- KnownBoxes.cs
- HtmlAnchor.cs
- ListCardsInFileRequest.cs
- PageAdapter.cs
- CodeDOMProvider.cs
- DateTimeOffset.cs
- MultilineStringConverter.cs
- TextEffect.cs
- TaskFactory.cs
- WindowsStreamSecurityElement.cs
- SqlReorderer.cs
- MultiViewDesigner.cs
- RelationshipEndMember.cs
- DataBoundControl.cs
- PointUtil.cs
- SecondaryIndexDefinition.cs
- GeneratedContractType.cs