Image Button:: Mode Connecte (Recomended)
Image Button:: Mode Connecte (Recomended)
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