0% found this document useful (0 votes)
27 views2 pages

Image Button:: Mode Connecte (Recomended)

The document discusses various ASP.NET controls including RadioButtonList, DropDownList, BulletedList, CheckBoxList, and validation controls like RequiredFieldValidator, RangeValidator, CompareValidator, and RegularExpressionValidator. Code examples are provided for binding data sources to controls, adding items to a BulletedList, deleting multiple items from a CheckBoxList, and accessing the current index of a BulletedList. Validation controls are described along with their common properties.

Uploaded by

Ali El Heddad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

Image Button:: Mode Connecte (Recomended)

The document discusses various ASP.NET controls including RadioButtonList, DropDownList, BulletedList, CheckBoxList, and validation controls like RequiredFieldValidator, RangeValidator, CompareValidator, and RegularExpressionValidator. Code examples are provided for binding data sources to controls, adding items to a BulletedList, deleting multiple items from a CheckBoxList, and accessing the current index of a BulletedList. Validation controls are described along with their common properties.

Uploaded by

Ali El Heddad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Asp.

net
RadioButtonList1.DataSource = ds.Tables[1];
Image button:
RadioButtonList1.DataTextField = "NomServece";
MouseX=e.x;
RadioButtonList1.DataValueField = "idServece";
MouseY=e.y;
RadioButtonList1.DataBind();
Dropdownlist:mode connecte(recomended)
}
DropDownList1.DataTextField = "id";
BulletedList
DropDownList1.DataValueField = "id";
BulletedList1.Items.Add(new ListItem(rd[1].ToString(), rd[0].ToString()));
DropDownList1.DataSource = ds.Tables[0];
Or
DropDownList1.DataBind();
BulletedList1.datasource=dt;
Fill dropdownlist:
Delete multiple lignes from combobox:
SqlDataAdapter da = new SqlDataAdapter("select * from Prsonnel;select * from
service", "data source=DESKTOP-QHGVVJ5 ;initial catalog=Personnell ;integrated foreach(ListItem x in CheckBoxList1.Items)
security=yes"); {
DataSet ds = new DataSet(); if (x.Selected)
protected void Page_Load(object sender, EventArgs e) {
{ SqlDataSource4.DeleteParameters[0].DefaultValue = x.Value;
if (!this.IsPostBack)// avoid filling combobox evry time the page loaded SqlDataSource4.Delete();
{ }
da.Fill(ds); }
DropDownList1.DataSource = ds.Tables[0]; CheckBoxList1.DataBind();
DropDownList1.DataTextField = "Matricule"; }
DropDownList1.DataValueField= "Nom";

DropDownList1.DataBind();
Bulletedlist current index:
var x = BulletedList2.Items[e.Index].Value;

contrôles de validation :
 RequiredFieldValidator

ControlToValidate
ErrorMessage
InitialValue
Text

 RangeValidator

ControlToValidate
ErrorMessage
MinimumValue
MaximumValue
Text

 CompareValidator

Operator
ValueToCompare
ControlToCompare
 RegularExpressionValidator
 CustomValidator
 ValidationSummary

You might also like