【问题标题】:Asp:DropDownList is not working expect for internet explorer, issue ( browser compatibility)Asp:DropDownList 在 Internet Explorer 中无法正常工作,问题(浏览器兼容性)
【发布时间】:2012-11-12 12:36:33
【问题描述】:

我有一个大约 3 岁的旧项目(网络应用程序)。现在我正在尝试使其浏览器与新浏览器兼容。下拉列表在 IE8 和 firefox3.5 上运行良好。但不适用于新的 Mozilla Firefox 版本 17 或 chrome。单击下拉菜单时,没有任何反应。

有人知道吗?

【问题讨论】:

  • 请包含一些代码以显示您尝试过的内容。

标签: asp.net drop-down-menu cross-browser


【解决方案1】:

设置

AutoPostBack="True"..

这可能对你有帮助

【讨论】:

  • AutoPost 为真,下面是代码的一部分(必需部分),因为整个文件太大。
  • if (!Page.IsPostBack) {bindDDLActions();} public void bindDDLActions() { SqlParameter[] spar = new SqlParameter[0]; dt = objtcBLL.manageActions(晶石,参考 errMsg); if (errMsg == string.Empty) { if (dt.Rows.Count > 0) { int count = dt.Rows.Count; Int64 Tb002_Id = Convert.ToInt64(Session["ProjectID"]); Int64 Tb005_Id = Convert.ToInt64(Session["TB005_Id"]); ddlActionList1.DataSource = dt; ddlActionList1.DataTextField = "状态"; ddlActionList1.DataValueField = "Tb011_Id"; ddlActionList1.DataBind(); ddlActionList1.Items.Insert(0, new ListItem("--- Select ---", "0")); }
  • 此函数启用 DropDownList protected void btnDial_Click(object sender, EventArgs e) { clearFields(); ddlActionList1.Enabled = true; btnDial.Enabled = 假; btnRefresh.Enabled = 假; hdIntime.Value = DateTime.Now.ToString(); BindAppAdditionalDetails(); lblContactHead.Text = "正在调用"; }
猜你喜欢
  • 1970-01-01
  • 2012-12-11
  • 1970-01-01
  • 2011-07-11
  • 2014-02-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多