如何在repeater row click事件上传递值以生成弹出窗口? [英] how to pass value on repeaters row click event to generate popup ?
本文介绍了如何在repeater row click事件上传递值以生成弹出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要做的是在转发器上行点击我想生成弹出包含值以填充属于该行...
What i am trying to do is on repeaters row click i want to generate popup containg value to fill belongs to that row ...
<asp:Repeater ID="repEmpHeadings" OnItemCommand="repEmpHeadings_ItemCommand" runat="server" OnItemDataBound="repEmpHeadings_ItemDataBound">
<ItemTemplate>
<div onclick="<%# getPostbackReference((string) Eval("CalibrationProfileId").ToString() + ";" +Eval("EmpCalibrationHeadingId").ToString() + ";" + Eval("HeadingId").ToString() ) %>">
<%# Container.DataItem %>
<div></div>
<div></div>
<div></div>
</div>
</ItemTemplate>
</asp:Repeater>
在我的页面上加载: -
On my page load :-
if (IsPostBack)
{
string arg = Request["__EVENTARGUMENT"];
if (string.IsNullOrEmpty(arg) == false)
{
if (arg.StartsWith("row"))
{
string[] arg1 = new string[3];
arg1 = arg.Substring(arg.IndexOf("#") + 1).ToString().Split(';');
string v = arg.Substring(arg.IndexOf("#") + 1);
mpCompetencyDetails.Show();
EditMidYearCompetencyDetails(Convert.ToInt32(arg1[0]), Convert.ToInt32(arg1[1]), Convert.ToInt32(arg1[2]));
}
}
}
这是myn其他方法
This is myn other method
protected string getPostbackReference(string Name)
{
return ClientScript.GetPostBackEventReference(this, "rowEvent#" + Name);
}
模型弹出窗口即将到来,但是我在div click事件上传递的id不能一直正常
model popup is coming , but the id which i am passing on div click event are not coming proper all the time
推荐答案
这篇关于如何在repeater row click事件上传递值以生成弹出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文