Category Archives for ASP Objects

Adrotator Control in ASP.Net C#

September 2, 2019

ASP.Net AdRotator Control

The AdRotator is one of the rich web server control of AdRotator control is used to display a sequence of advertisement images as per given priority of image.

Adrotator control display the sequence of images, which is specified in the external XML file. In a xml file we indicate the images to display with some other attributes, like  image impressions, NavigateUrl, ImageUrl, AlternateText.

In a Adrotator control images will be changed each time while refreshing the web page.

AdRotator Control Example in ASP.Net

Step 1 – Open the Visual Studio –> Create a new empty Web application.

Step 2 – Create a  New web page for display AdRotator control.

step 3 – Drag and drop AdRotator Control on web page from toolbox.

step 4 – go to Add New Item –> Add New XML File in project for write advertisement detail.

step 5 – Assign XML File to AdvertisementFile Property of AdRotator control.

ASP: Text Boxes

asp dot net hosting
ASP: Text Boxes   Text box controls are typically used to accept input from the user. A text box control can accept one or more lines of text depending upon the settings of the TextMode attribute. One of the main features of Web pages is to offer forms that user can use to submit info. A flexible feature is the textmode control to allow a change in the text behavior for things like passwords. Label controls provide an easy way to display text which can be changed from one execution of a page to the next. If you want to display text that does not change, you use the literal text. Basic syntax of text control:
<asp:TextBox ID="txtstate" runat="server" ></asp:TextBox>
Common Properties of the Text Box and Labels:
Property Description
TextMode Specifies the type of text box. SingleLine creates a standard text box, MultiLIne creates a text box that accepts more than one line of text and the Password causes the characters that are entered to be masked. The default is SingleLine.
Text The text content of the text box.
MaxLength The maximum number of characters that can be entered into the text box.
Wrap It determines whether or not text wraps automatically for multi-line text box; default is true.
ReadOnly Determines whether the user can change the text in the box; default is false, i.e., the user can change the text.
Columns The width of the text box in characters. The actual width is determined based on the font that is used for the text entry.
Rows The height of a multi-line text box in lines. The default value is 0, means a single line text box.
The mostly used attribute for a label control is 'Text', which implies the text displayed on the label.