C# ASP.NET事件未触发
所以我有一个事件,基本上检查我是否已经添加到了发货中。我在C# ASP.NET事件未触发,c#,asp.net,C#,Asp.net,所以我有一个事件,基本上检查我是否已经添加到了发货中。我在inventoryBLL inv=newinventorybll()处设置了一个断点并且它从不中断。有趣的是,我可以不费吹灰之力就得到索引 我的C# protectedvoid rblSwitch1\u SelectedIndexChanged(对象发送方,事件参数e) { inventoryBLL inv=新的inventoryBLL(); List asinholder=新列表(); 列表FNSKHOLDER=新列表(); int I
inventoryBLL inv=newinventorybll()处设置了一个断点代码>并且它从不中断。有趣的是,我可以不费吹灰之力就得到索引
我的C#
protectedvoid rblSwitch1\u SelectedIndexChanged(对象发送方,事件参数e)
{
inventoryBLL inv=新的inventoryBLL();
List asinholder=新列表();
列表FNSKHOLDER=新列表();
int Index=newint();
asinwrapper asin=asinwrapper.GetSessionWrapper();
如果(asin!=null)
{
FNSKHOLDER=asin.FNSKU;
asinholder=asin.asin;
索引=asin.索引;
}
列表详细信息=新列表();
multipleshipments m=multipleshipments.GetSessionWrapper();
如果(m!=null)
{
细节=m.细节;
}
inventory.ItemCheckDataTable items=inv.GetItem(asinholder[Index],细节[0].Id[ddlExisting1.SelectedIndex]);
如果(items.Rows.Count<0)
{
foreach(项目中的inventory.ItemCheckRow行)
{
txt.Text=行.数量;
}
}
}
这是HTML
<asp:RadioButtonList ID="rblSwitch1" runat="server"
onselectedindexchanged="rblSwitch1_SelectedIndexChanged">
<asp:ListItem Value="0">New Shipment</asp:ListItem>
<asp:ListItem Value="1">Existing Shipment</asp:ListItem>
</asp:RadioButtonList>
新装运
现有货物
将AutoPostBack=“true”
添加到标签中。这应该是:
<asp:RadioButtonList ID="rblSwitch1" runat="server" AutoPostBack="true"
onselectedindexchanged="rblSwitch1_SelectedIndexChanged">
<asp:ListItem Value="0">New Shipment</asp:ListItem>
<asp:ListItem Value="1">Existing Shipment</asp:ListItem>
</asp:RadioButtonList>
将AutoPostBack=“true”
添加到标签中。这应该是:
<asp:RadioButtonList ID="rblSwitch1" runat="server" AutoPostBack="true"
onselectedindexchanged="rblSwitch1_SelectedIndexChanged">
<asp:ListItem Value="0">New Shipment</asp:ListItem>
<asp:ListItem Value="1">Existing Shipment</asp:ListItem>
</asp:RadioButtonList>
如果这不是由于控件的AutoPostBack
设置为false引起的,请检查AutoEventWireup
是否设置为false。它可以在多个位置进行设置,包括页眉和配置文件。如果它不是由控件的AutoPostBack
设置为false引起的,请检查AutoEventWireup
是否设置为false。它可以在多个位置设置,包括页眉和配置文件。你的意思是它在索引存在的语句处中断吗?单击列表项时它没有触发回发,是吗?你的意思是它在索引存在的语句处中断吗?单击列表项时它没有触发回发吗?