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
- PointLightBase.cs
- XmlAutoDetectWriter.cs
- QueryExpr.cs
- RefreshResponseInfo.cs
- GridViewColumn.cs
- InstallHelper.cs
- DeclarativeCatalogPart.cs
- PageThemeBuildProvider.cs
- AdRotator.cs
- ExpressionBuilder.cs
- AutomationElementIdentifiers.cs
- EventHandlerList.cs
- EventTrigger.cs
- CancellableEnumerable.cs
- EncoderExceptionFallback.cs
- DynamicFilter.cs
- RoutedEventConverter.cs
- CssClassPropertyAttribute.cs
- ReferentialConstraint.cs
- BinarySerializer.cs
- OracleRowUpdatingEventArgs.cs
- BeginEvent.cs
- TreePrinter.cs
- DbConnectionPoolOptions.cs
- ConfigurationPropertyCollection.cs
- CompositeActivityMarkupSerializer.cs
- EventLogPermissionAttribute.cs
- Avt.cs
- ResXBuildProvider.cs
- ControlBuilder.cs
- InfocardExtendedInformationEntry.cs
- AdCreatedEventArgs.cs
- FileUtil.cs
- Unit.cs
- DesignSurface.cs
- QilReference.cs
- SizeIndependentAnimationStorage.cs
- UnSafeCharBuffer.cs
- NumericUpDown.cs
- counter.cs
- MarkupExtensionReturnTypeAttribute.cs
- BrowserCapabilitiesCompiler.cs
- AxHost.cs
- FamilyMap.cs
- ProtocolsConfigurationHandler.cs
- PerformanceCounter.cs
- MonitoringDescriptionAttribute.cs
- PropertyItemInternal.cs
- ExpressionBinding.cs
- BuildProviderInstallComponent.cs
- SafeBitVector32.cs
- DataGridCellEditEndingEventArgs.cs
- ResourceManager.cs
- GCHandleCookieTable.cs
- RefreshPropertiesAttribute.cs
- DbProviderFactory.cs
- BindingUtils.cs
- NavigationProperty.cs
- MailWebEventProvider.cs
- MailDefinition.cs
- SchemaImporterExtensionElementCollection.cs
- BypassElement.cs
- CacheHelper.cs
- Form.cs
- WinFormsUtils.cs
- MetadataAssemblyHelper.cs
- ProfileSection.cs
- objectquery_tresulttype.cs
- PeerContact.cs
- HttpHeaderCollection.cs
- CrossContextChannel.cs
- SettingsPropertyCollection.cs
- UshortList2.cs
- CacheRequest.cs
- WorkflowInstanceExtensionCollection.cs
- XmlWrappingWriter.cs
- StylusPointPropertyInfo.cs
- BindingList.cs
- SocketPermission.cs
- ConfigUtil.cs
- ClientEventManager.cs
- Table.cs
- ToolboxItemAttribute.cs
- ConfigXmlCDataSection.cs
- filewebrequest.cs
- TopClause.cs
- ResourceProviderFactory.cs
- _emptywebproxy.cs
- SchemaType.cs
- InfoCardPolicy.cs
- SimpleType.cs
- xamlnodes.cs
- UserControl.cs
- Compiler.cs
- DataPagerFieldCollection.cs
- ColorContext.cs
- FormatPage.cs
- XamlToRtfWriter.cs
- ListParaClient.cs
- DrawingAttributes.cs