110,538
社区成员
发帖
与我相关
我的任务
分享
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList2.DataSource = new ProjectTypeServer().GetAll();
DropDownList2.DataBind();
}
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
if (DropDownList2.SelectedIndex == -1)
{
PageBase.alert(Page, "系统错误");
return;
}
}
<form runat=server />
,并且设置页面的 EnableViewState为 fals。
但是这仅仅对网页而言的,不是针对应用程序。