Sitecore 5.1.1 API

MainUtil.GetSpacer Method (Int32, Int32, Boolean)

NOTE: This method is now obsolete.

Use Sitecore.Resources.Images.GetSpacer() instead


Gets an image HTML tag with a blank image.

[Visual Basic]
Overloads Public Shared Function GetSpacer( _
   ByVal width As Integer, _
   ByVal height As Integer, _
   ByVal verticalCenter As Boolean _
) As String
[C#]
public static string GetSpacer(
   int width,
   int height,
   bool verticalCenter
);

Parameters

width
Width of the image.
height
Height of the image.
verticalCenter
Indicates if the image is centered vertically.

Return Value

The image HTML tag.

Example

  string spacer = Images.GetSpacer(10, 10, true); // <img src="/sitecore/images/blank.gif" border="0" height="10" width="10" style="vertical-align: middle;">

See Also

MainUtil Class | Sitecore Namespace | MainUtil.GetSpacer Overload List