Home | HTML | Asp.Net | HTML Probe | .Net Probe
   
 www.solvingera.com 
  Contact Us |Sitemap
  

Web Server General Controls

Skip Navigation LinksHome>Asp Home>General Controls

Image Server Control

The Image server control enables you to work with the images that appear on your Web page from the server-side code. It is a simple server control, but it can give you the power to determine how your images are displayed on the browser screen.

Some properties of the Image controls are:
  • AlternativeText: Sets the alternative text that is displayed when a web browser does not support image.

  • ImageAlign: Sets the alignment of the image.

  • ImageURL: specify the URL of the image to be displayed.
Control ExampleOutput
Image Control

The Calendar Server Control

The Calendar server control enables you to place a full-featured calendar directly on your Web pages. It is used to display one month calendar to view date or select a specific day, week or month.

Some important property of the calendar control are :
  • DayNameFormat: Specifies the name format of the days of a week.

  • VisibleDate: Specify the month to be displayed in the calendar control.

  • FirstDayOfWeek: Specifies the day of the week to be displayed in the first column of the calendar control.

  • SelectedDate: Display the selected date.

  • SelectionMode: Specifies whether a user can select a day, a week, or a month. Day is the default value of this property.
Control ExampleOutput
Calendar Control <asp:Calendar ID="Calendar2" runat="server" BackColor="White" BorderColor="#3366CC" BorderWidth="1px" CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="#003399" Height="200px" Width="220px"><SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" /><SelectorStyle BackColor="#99CCCC" ForeColor="#336666" /><WeekendDayStyle BackColor="#CCCCFF" /><TodayDayStyle BackColor="#99CCCC" ForeColor="White" /><OtherMonthDayStyle ForeColor="#999999" /> <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" /><DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" /><TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" Font-Bold="True" Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" /></asp:Calendar>

AdRotator Server Control

With the AdRotator control, you can configure your application to show a series of advertisements to the end users. This control is used to display flashing banner advertisements on the WebPages randomly.

Some properties of the AdRotator Server Control are:
  • AdvertisementFile: It is used to sets the path of the XML advertisements file. The XML file contains several <Ad> elements one for each advertisement. Each <Ad> element contains an <ImageUrl> element that defines the image path.

  • KeywordFilter: Specifiesthe filter criteria based on which advertisements of specific categories will be displayed on a web page.

  • Target: Specifies the name of the web browser window that will display the contents of the linked page when this page is clicked.
Some XML elements details are :
  • ImageUrl: Takes a string value that indicates the location of the image to use.

  • AlternateText: Takes a string value that is used for display either if images are turned off in the client’s browser or if the image is not found or supported by the browser.

  • Impressions: Takes a numerical value that indicates the likelihood of the image being selected for display.

  • Keyword: Takes a string value that sets the category of the image in order to allow for the filtering of ads.

The Xml Server Control

The XML is used to write the output of an XML document on a web page. The XML output appears at the location of the control of the webpage.

Some important property of the XML control is:

  • Document : Sets the XML document to be displayed.

  • DocumentContent: Sets a string that contains the XML document to display.

  • TransformSource: Provides the XSLT file to use in transforming the XML document.

  • DocumentSource: Sets the path of the XML documents.

Panel Server Control

The Panel server control encapsulates a set of controls you can use to manipulate or lay out your ASP.NET pages. It is basically a wrapper for other controls, enabling you to take a group of server controls along with other elements (such as HTML and images) and turn them into a single unit.

Panel control is the capability to scroll with scrollbars that appear automatically depending on the amount of information that Panel control holds.

Values of ScrollBars attribute is None, Horizontal, Vertical and Both.

The PlaceHolder Server Control

A placeholder control is used as a container that is not visible in a web application. It is a placeholder for you to interject objects dynamically into your page. Think of it as a marker with which you can add other controls. The capability to add controls to a page at a specific point also works with the Panel control.

Code for adding a button and literal control in a placeholder control…

VB
Dim NewLabelControl As New Label()
NewLabelControl.Text = "Hello there";
PlaceHolder1.Controls.Add(NewLabelControl)
C#
Label NewLabelControl = new Label();
NewLabelControl.Text = "Hello there";
PlaceHolder1.Controls.Add(NewLabelControl);

BulletedList Server Control

The BulletedList server control is meant to display a bulleted list of items easily in an ordered (using the HTML <ol> element) or unordered (using the HTML <ul> element) fashion.

The BulletedList control can be constructed of any number of <asp:ListItem> controls or can be data-bound to a data source of some kind and populated based upon the contents retrieved.

The <asp:BulletedList> element, along with <asp:ListItem> elements, is used to produces a simple bulleted list output.

FileUpload Server Control

File upload server control put an <input type="file"> element on your Web page to enable the end user to upload files to the server. It is useful for allowing users to upload various types of files such as picture, text file etc from client’s computer to the server. The files that are to be uploaded are submitted to the server as part of the browser request during postback.

This control displays a textbox to type the name of the file that is to be uploaded on the server. It also displays a browse button that is used to browse for file.

Some properties of the FileUpload Server Control are:
  • Filename: Sets the name of the file on the client’s computer to be uploaded.

  • HasFile: Gets a value that indicates whether the control contains a file.

MultiView and View Server Controls

A MultiView control is a set of view controls. The MultiView and View server controls work together to give you the capability to turn on/off sections of an ASP.NET page. Turning sections on and off, which means activating or deactivating a series of View controls within a MultiView control. The sections, or views, do not change on the client-side; rather, they change with a postback to the server.

Some important properties of the MultiView control are:
  • Id : Sets the unique identifier assigned to the multiview control.

  • Views : Gets the collection of view controls in the MultiView control.

  • Visible : Sets a value that indicates whether a MultiView control is rendered as UI on the page.

Wizard Server Control

A wizard is a group of forms used to accomplish a particular task. ASP.NET provides a wizard control that is used to enable a user to perform a task step-by-step or to collect user input related to the task. A Wizard control contains a series of forms that describe the whole task. In its simplest form, the Wizard control can be just an <asp:Wizard> element with any number of <asp:WizardStep> elements. Wizard Server Control provides an easy mechanism that allow you to build steps, add a new step, or reorder the steps.

Some important properties of the Wizard Server control are:
  • Id : Sets the unique identifier assign to the Wizard Control.

  • WizardSteps : Gets the collection of all the WizardStepBase objects that are defined for the control.

  • EnableViewState : Sets a value indicating whether the wizard control persists its view state, and the view state of any child controls it contains.

  • Enabled: Sets a value that indicates the Wizard Control is enabled.

  • ToolTip : Sets the text displayed when the mouse pointer hovers over the wizard control.
     
  
DMCA.com Protection Status
Design & Maintain By solvingera group| solvingera.com © 2013-2014 | all right reserved |Privacy Policy | Back to top