- protected void DropDownList4_SelectedIndexChanged(object sender, EventArgs e)
- {
- Response.Redirect(this.DropDownList4.SelectedValue);
- }
- // DropDownList4.Attributes.Add("onclick", "this.form.target='_blank'");
- DropDownList4.Attributes.Add("onchange", "this.form.target='_blank'");
本文介绍了一个简单的 ASP.NET 事件处理方法,该方法在 DropDownList 控件的选择发生更改时触发页面重定向。此示例展示了如何使用 Response.Redirect 方法实现基于用户选择的导航。
161

被折叠的 条评论
为什么被折叠?



