今天在做一个查询页面,有几个文本框,和2个下拉框,当我点按钮时,出现链接中 图2的情况,连错误都不报,我把漏洞ID那个 下拉框注释掉后,能正常查询, 加上后就出现图2的情况,不知怎么解决
图片地址: http://blog.csdn.net/w87875251l/archive/2011/01/06/6120847.aspx 漏洞ID<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
cs文件: protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDrop();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Request.Cookies.Clear();
HttpCookie cookie1 = new HttpCookie("hostname",hostname.Text);
HttpCookie cookie2 = new HttpCookie("mac",Mac.Text );
HttpCookie cookie3 = new HttpCookie("patch", Patch.Text);
//HttpCookie cookie4 = new HttpCookie("holeID", HoleID.SelectedValue);
HttpCookie cookie5 = new HttpCookie("holeInstall", HoleInstall.SelectedValue );
Response.Cookies.Add(cookie1);
Response.Cookies.Add(cookie2);
Response.Cookies.Add(cookie3);
//Response.Cookies.Add(cookie4);
Response.Cookies.Add(cookie5);
}
private void BindDrop()
{
DropDownList1.DataTextField = "Vul_ID";
DropDownList1.DataSource = bl2.DropHoleID();
DropDownList1.DataBind();
图片地址: http://blog.csdn.net/w87875251l/archive/2011/01/06/6120847.aspx 漏洞ID<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
cs文件: protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDrop();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Request.Cookies.Clear();
HttpCookie cookie1 = new HttpCookie("hostname",hostname.Text);
HttpCookie cookie2 = new HttpCookie("mac",Mac.Text );
HttpCookie cookie3 = new HttpCookie("patch", Patch.Text);
//HttpCookie cookie4 = new HttpCookie("holeID", HoleID.SelectedValue);
HttpCookie cookie5 = new HttpCookie("holeInstall", HoleInstall.SelectedValue );
Response.Cookies.Add(cookie1);
Response.Cookies.Add(cookie2);
Response.Cookies.Add(cookie3);
//Response.Cookies.Add(cookie4);
Response.Cookies.Add(cookie5);
}
private void BindDrop()
{
DropDownList1.DataTextField = "Vul_ID";
DropDownList1.DataSource = bl2.DropHoleID();
DropDownList1.DataBind();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货