![](/img/trans.png)
[英]how can i redirect to another page in function that called by btnclick. ASP.NET
[英]A btnclick Function calls another function,but the call not in the btnclick function
考虑以下内容:.cs文件中buttonclick fn的代码:
protected void additembtnClick(object sender, EventArgs e)
{
DataTable dt = createTemptable();
dt = (DataTable)Session["dfdtemptable"];
this.DFDLOVlst.DataSource = dt;
this.DFDLOVlst.DataBind();
this.txtLOVCode.Visible = true;
this.txtLOVvalue.Visible = true;
MDIngrdientsCode.Show();
}
这是datagrid的on_row单击的fn
protected void OnFindSelect(int Value)
{
}
findbtn的代码,请点击:
protected void btnFind_Click(object sender, EventArgs e)
{
this.FindLookup.SetLookup();
this.FindLookup.SearchLookup();
this.MdFindLookup.Show();
}
单击查找按钮时,查找控件将从数据库中加载值。选择任何行时,选定的行值将添加到相应的文本框和数据网格中。 additembnclick用于向数据网格添加新条目。用户可以添加新值,也可以单击查找并选择一行并在数据网格中更新其值。 用户添加新值时没有问题。当用户单击查找并选择特定行时,这些值将添加到对应的字段中。现在,如果用户单击additem按钮将新值添加到datagrid中已存在的值中然后会自动调用fn onfindselected(对于包含数据网格的查找控件的onrowclicked事件为fn),但该调用不在按钮fn中。
无法找出出什么问题..?
看来OnFindSelect本身不是事件处理程序。 它可能是从另一个事件处理程序(或多个)中调用的。 尝试查找所有对其的调用,看看是否有意义
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.