انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

Asp.Net Web Server Controls Set #1

الكلية كلية تكنولوجيا المعلومات     القسم قسم شبكات المعلومات     المرحلة 2
أستاذ المادة حۡــسۜــنۨ ا̍ڷــڔهــٻۧــمۘــې       3/15/2012 5:01:45 PM

Please Not تحتوي هذه المحاضرة على مثال الولوج الى كل خصائص الـ DropDownList والتي تم شرحها في المختبر الاخير لكروب - B -


TextBox control
You use the TextBox control to get information, such as text, numbers, and dates, from users in a Web Forms page. You can set the TextMode property of a TextBox control to set the type as a single-line, password, or multiline TextBox control. By default, a TextBox control is a single-line text box that allows users to type characters in a single line only. A password TextBox control is similar to the single-line text box, but masks the characters that are typed by users and displays them as asterisks (*). A multiline TextBox control allows users to type multiple lines and wrap text. The appearance of the TextBox control can be modified by using properties such as BackColor or ForeColor.
• Text : Represents the text to be displayed in the TextBox control.Also, you can use this property to set or retrieve the text to or from a TextBox control at run time.
• MaxLength Represents the number of characters that a user can type in the TextBox control.
• Width : Represents the width of a TextBox control. This property takes value in pixels.
• Columns : Represents the width of a TextBox control in characters. If you set both the Width and Columns properties, the Width property takes precedence over the Columns property. The default value is 0.
• TextMode : Represents the behavior of the TextBox control, such as single-line, multiline, or password. By default, the control is a single-line text box. To set a password text box, set this property to TextBoxMode.Password. To set a multiline text box, set this property to TextBoxMode.MultiLi ne. The values SingleLine, MultiLine, and Password are part of an enum called TextBoxMode. You cannot specify it directly.

• Height : Represents the vertical size of the TextBox control and takes value in pixels. Rows Represents the vertical size of the MultiLineTextBox control and takes value in number of rows The default value is 0.

• Wrap: Represents the word wrap behavior in a multiline TextBox control. The text wraps automatically if the value is set to True. However, a user must press a carriage return to move to a next line if the value is set to False. The default value is True.


DropDownList control
The DropDownList control allows users to select an item from a set of predefined items — each item is a separate object with its own properties, such as Text, Value, and Selected. You can add these predefined items to a DropDownList control by using its Items property. Unlike the ListBox control, you can select only one item at a time, and the list of items remains hidden until a user clicks the drop-down button. The most important properties of the DropDownList control :


• Items Represents : the collection of tems in the DropDownList control. Each item has three properties associated with it: Text,Value, and Selected.
• Width : Represents the width of a DropDownList control and takes value inpixels.
• Height : Represents the vertical size of the DropDownLi st control and takes value in pixels.

HyperLink control
The HyperLink control creates links on a Web page and allows users to navigate from one page to another in an application or an absolute URL. You can use text or an image to act as a link in a HyperLink control. When users click the control, the target page opens.

• Text : Represents the text displayed as a link.
• ImageUrl : Represents the image displayed as a link. The image file should be stored in the same application
project.
• NavigateUrl : Represents the URL of the target page.

ListBox control
The ListBox control is a list of predefined items and allows users to select one or more items from the list. The ListBox control is a collection of items. The individual list items can be added by using the Items property of the ListBox control. You can add list items to the ListBox control in the same way you add items to the CheckBoxList and RadioButtonList controls. You can access the index of the selected item by using the SelectedIndex property and access the selected item in the list by using the SelectedItem property of the control.

المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .