IE10环境下 asp:Repeater无法操作,跪求砖头玉块儿!!!!!
从IE8升级到IE10,之前项目的<asp:Repeater onitemcommand="rptTrans_ItemCommand">onitemcommand事件无法触发,是任何页面的都无法触发,这不是模板,通过<asp:LinkButton ID="lbtnOK" runat="server" CommandName="ok" CommandArgument='<%#Eval("Orders_Id") %>'>来触发的
protected void rptTrans_ItemCommand(object source, RepeaterCommandEventArgs e)
{
int ordersId = ConvertFun.StringToInt(e.CommandArgument, 0);
//确认收货
if (e.CommandName=="ok")
{
if (ConfirmReceipt(ordersId))
{
string url = Request.Url.ToString();
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "", "<Script type="text/javascript" >alert("确认收货成功!");location="" + url + "";</script>", false);
}
else
{
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "", "<Script type="text/javascript" >alert("确认收货失败!");</script>", false);
}
}
}
=====================================================================
#region 批量删除收藏
protected void lbtnDelBatch_Click(object sender, EventArgs e)
{
try
{
string strId = "";
//string strArr = Request.Form["cbox_favoId"]; //测试,依然无效
/********测试**********/
foreach (Control c in this.Repeater1.Controls)//this.Repeater1.Controls得到的是空值
{
string hfId = ((HiddenField)(c.FindControl("hf_favoId"))).Value.Trim();
CheckBox check = (CheckBox)c.FindControl("cbox_favoId");
if (check.Checked)
{
strId = strId.Equals("") ? hfId : strId + "," + hfId;
}
}
/********测试**********/
/********使用的方法**********/
foreach (RepeaterItem Item in this.Repeater1.Items)//this.Repeater1.Items得到的是NULL
{
CheckBox chk = (CheckBox)Item.FindControl("cbox_favoId");
string hfId = ((HiddenField)(Item.FindControl("hf_favoId"))).Value.Trim();
if (chk.Checked)
{
strId = strId.Equals("") ? hfId : strId + "," + hfId;
}
}
/********使用的方法**********/
if (!StringHelp.IsNullorEmpty(strId))
{
string[] strIdList = strId.Split(',');
for (int i = 0; i < strIdList.Length; i++)
{
DelFavor(ConvertFun.StringToInt(strIdList[i], 0));
}
}
else
{
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "", "<Script type="text/javascript" >alert("没选中任意一项进行操作!");location=window.location.href;</script>", false);
return;
}
}
catch (Exception ex)
{
throw new Exception("消息:" + ex.Message + " " + "详细信息:" + ex.StackTrace);
}
LoadData();
}
#endregion
这是使用在<asp:Repeater>外部的
<asp:LinkButton ID="lbtnDelBatch" runat="server" OnClientClick='return confirm("确定要删除所选收藏商品吗?")'
OnClick="lbtnDelBatch_Click"><h1 class="Member_bn_h1 Member_bn_color">删除所选</h1></asp:LinkButton>
按钮事件,但是等不到选中项,以上代码在IE8正常,求原因,求解答方法 IE10 Repeater asp.net 兼容
[解决办法]
refer:http://blog.csdn.net/smeyou/article/details/9033663
[解决办法]
唉,看来IE10毛病不少。我用Jquery的上传插件写了个上传,结果input不显示了。用火狐就正常了。