asp.net 基础知识

1、 DropDownList 的赋值

    Response.Write(DropDownList1.Items.FindByText("潍坊").Value);
    Response.Write(DropDownList1.Items.FindByValue("0536").Text);

    Response.Write(DropDownList1.SelectedItem.Value);

2、GridView 模板列取值





protected void Button1_Click(object sender, EventArgs e)
{
for (int i=0; i< GVListShow.Rows.Count; i++)
{
((Label)GVListShow.Rows[i].FindControl("Labpexamroom_name")).Text = "44445";
}
}

你可能感兴趣的:(asp.net 基础知识)