Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / HtmlControls / HtmlImage.cs / 1 / HtmlImage.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * HtmlImage.cs * * Copyright (c) 2000 Microsoft Corporation */ namespace System.Web.UI.HtmlControls { using System; using System.Globalization; using System.Collections; using System.ComponentModel; using System.Web; using System.Web.UI; using System.Security.Permissions; ////// [ ControlBuilderAttribute(typeof(HtmlEmptyTagControlBuilder)) ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class HtmlImage : HtmlControl { /* * Creates an intrinsic Html IMG control. */ ////// The ////// class defines the methods, properties, and events /// for the HtmlImage server control. /// This class provides programmatic access on the server to /// the HTML <img> element. /// /// public HtmlImage() : base("img") { } /* * Alt property */ ///Initializes a new instance of the ///class. /// [ WebCategory("Appearance"), Localizable(true), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string Alt { get { string s = Attributes["alt"]; return((s != null) ? s : String.Empty); } set { Attributes["alt"] = MapStringAttributeToString(value); } } /* * Align property */ ////// Gets or sets the alternative caption that the /// browser displays if image is either unavailable or has not been downloaded yet. /// ////// [ WebCategory("Appearance"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string Align { get { string s = Attributes["align"]; return((s != null) ? s : String.Empty); } set { Attributes["align"] = MapStringAttributeToString(value); } } /* * Border property, size of border in pixels. */ ///Gets or sets the alignment of the image with /// surrounding text. ////// [ WebCategory("Appearance"), DefaultValue(0), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public int Border { get { string s = Attributes["border"]; return((s != null) ? Int32.Parse(s, CultureInfo.InvariantCulture) : -1); } set { Attributes["border"] = MapIntegerAttributeToString(value); } } /* * Height property */ ////// Gets or sets the width of image border, in pixels. /// ////// [ WebCategory("Layout"), DefaultValue(100), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public int Height { get { string s = Attributes["height"]; return((s != null) ? Int32.Parse(s, CultureInfo.InvariantCulture) : -1); } set { Attributes["height"] = MapIntegerAttributeToString(value); } } /* * Src property. */ ////// Gets or sets /// the height of the image. By default, this is expressed in /// pixels, /// but can be a expressed as a percentage. /// ////// [ WebCategory("Behavior"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), UrlProperty() ] public string Src { get { string s = Attributes["src"]; return((s != null) ? s : String.Empty); } set { Attributes["src"] = MapStringAttributeToString(value); } } /* * Width property */ ////// Gets or sets the name of and path to the /// image file to be displayed. This can be an absolute or /// relative path. /// ////// [ WebCategory("Layout"), DefaultValue(100), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public int Width { get { string s = Attributes["width"]; return((s != null) ? Int32.Parse(s, CultureInfo.InvariantCulture) : -1); } set { Attributes["width"] = MapIntegerAttributeToString(value); } } /* * Override to render unique name attribute. * The name attribute is owned by the framework. */ ////// Gets or sets the width of the image. By default, this is /// expressed in pixels, /// but can be a expressed as a percentage. /// ////// /// protected override void RenderAttributes(HtmlTextWriter writer) { PreProcessRelativeReferenceAttribute(writer, "src"); base.RenderAttributes(writer); writer.Write(" /"); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * HtmlImage.cs * * Copyright (c) 2000 Microsoft Corporation */ namespace System.Web.UI.HtmlControls { using System; using System.Globalization; using System.Collections; using System.ComponentModel; using System.Web; using System.Web.UI; using System.Security.Permissions; ////// [ ControlBuilderAttribute(typeof(HtmlEmptyTagControlBuilder)) ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class HtmlImage : HtmlControl { /* * Creates an intrinsic Html IMG control. */ ////// The ////// class defines the methods, properties, and events /// for the HtmlImage server control. /// This class provides programmatic access on the server to /// the HTML <img> element. /// /// public HtmlImage() : base("img") { } /* * Alt property */ ///Initializes a new instance of the ///class. /// [ WebCategory("Appearance"), Localizable(true), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string Alt { get { string s = Attributes["alt"]; return((s != null) ? s : String.Empty); } set { Attributes["alt"] = MapStringAttributeToString(value); } } /* * Align property */ ////// Gets or sets the alternative caption that the /// browser displays if image is either unavailable or has not been downloaded yet. /// ////// [ WebCategory("Appearance"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string Align { get { string s = Attributes["align"]; return((s != null) ? s : String.Empty); } set { Attributes["align"] = MapStringAttributeToString(value); } } /* * Border property, size of border in pixels. */ ///Gets or sets the alignment of the image with /// surrounding text. ////// [ WebCategory("Appearance"), DefaultValue(0), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public int Border { get { string s = Attributes["border"]; return((s != null) ? Int32.Parse(s, CultureInfo.InvariantCulture) : -1); } set { Attributes["border"] = MapIntegerAttributeToString(value); } } /* * Height property */ ////// Gets or sets the width of image border, in pixels. /// ////// [ WebCategory("Layout"), DefaultValue(100), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public int Height { get { string s = Attributes["height"]; return((s != null) ? Int32.Parse(s, CultureInfo.InvariantCulture) : -1); } set { Attributes["height"] = MapIntegerAttributeToString(value); } } /* * Src property. */ ////// Gets or sets /// the height of the image. By default, this is expressed in /// pixels, /// but can be a expressed as a percentage. /// ////// [ WebCategory("Behavior"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), UrlProperty() ] public string Src { get { string s = Attributes["src"]; return((s != null) ? s : String.Empty); } set { Attributes["src"] = MapStringAttributeToString(value); } } /* * Width property */ ////// Gets or sets the name of and path to the /// image file to be displayed. This can be an absolute or /// relative path. /// ////// [ WebCategory("Layout"), DefaultValue(100), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public int Width { get { string s = Attributes["width"]; return((s != null) ? Int32.Parse(s, CultureInfo.InvariantCulture) : -1); } set { Attributes["width"] = MapIntegerAttributeToString(value); } } /* * Override to render unique name attribute. * The name attribute is owned by the framework. */ ////// Gets or sets the width of the image. By default, this is /// expressed in pixels, /// but can be a expressed as a percentage. /// ////// /// protected override void RenderAttributes(HtmlTextWriter writer) { PreProcessRelativeReferenceAttribute(writer, "src"); base.RenderAttributes(writer); writer.Write(" /"); } } } // 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
- SerialPinChanges.cs
- TypeName.cs
- WorkflowExecutor.cs
- Enlistment.cs
- EventLogReader.cs
- RegistryPermission.cs
- SiblingIterators.cs
- COM2TypeInfoProcessor.cs
- WindowsEditBox.cs
- MD5Cng.cs
- ObjectIDGenerator.cs
- DrawingGroup.cs
- StateDesignerConnector.cs
- BaseCAMarshaler.cs
- GifBitmapDecoder.cs
- EncryptedData.cs
- BitmapSizeOptions.cs
- CustomServiceCredentials.cs
- WindowsRichEdit.cs
- CodeDomDesignerLoader.cs
- httpstaticobjectscollection.cs
- MappingException.cs
- ListViewUpdatedEventArgs.cs
- XmlKeywords.cs
- LocalizableResourceBuilder.cs
- SessionStateSection.cs
- GridViewColumnCollectionChangedEventArgs.cs
- JsonGlobals.cs
- ImageCodecInfoPrivate.cs
- KeyedCollection.cs
- XmlSerializer.cs
- UniqueCodeIdentifierScope.cs
- PeerApplicationLaunchInfo.cs
- HttpProtocolReflector.cs
- DBParameter.cs
- BufferedGraphics.cs
- DataColumnCollection.cs
- CollaborationHelperFunctions.cs
- DesignerDeviceConfig.cs
- MenuItemStyle.cs
- DesignerAutoFormatStyle.cs
- FreeFormDesigner.cs
- SectionRecord.cs
- DesignerWidgets.cs
- InkCanvas.cs
- HttpCapabilitiesBase.cs
- EventLogEntryCollection.cs
- UserControl.cs
- XmlName.cs
- WindowsNonControl.cs
- CopyAttributesAction.cs
- WindowsSpinner.cs
- SafeCryptContextHandle.cs
- WindowInteractionStateTracker.cs
- WinFormsComponentEditor.cs
- OperationFormatStyle.cs
- ADRoleFactoryConfiguration.cs
- CompilationSection.cs
- GlobalItem.cs
- OutputCacheModule.cs
- InlinedAggregationOperator.cs
- ViewCellRelation.cs
- ItemDragEvent.cs
- PersonalizationDictionary.cs
- DataKey.cs
- SelectedCellsCollection.cs
- UnsafeNativeMethods.cs
- QueryStringParameter.cs
- TemplateEditingVerb.cs
- MobileControlPersister.cs
- FormsAuthenticationConfiguration.cs
- InputLanguageSource.cs
- XamlToRtfWriter.cs
- FormatException.cs
- IdentifierService.cs
- ExplicitDiscriminatorMap.cs
- BasicHttpBindingElement.cs
- EditableRegion.cs
- DocumentViewerHelper.cs
- XmlSchemaComplexContent.cs
- FilteredReadOnlyMetadataCollection.cs
- PrimitiveCodeDomSerializer.cs
- Frame.cs
- XmlnsCache.cs
- ProvidePropertyAttribute.cs
- BamlVersionHeader.cs
- QilDataSource.cs
- PageAdapter.cs
- PenLineCapValidation.cs
- WeakReferenceEnumerator.cs
- ServiceMetadataContractBehavior.cs
- BufferBuilder.cs
- DisplayNameAttribute.cs
- DownloadProgressEventArgs.cs
- HttpChannelBindingToken.cs
- NotSupportedException.cs
- OneOfTypeConst.cs
- OperationParameterInfo.cs
- TitleStyle.cs
- Geometry.cs