Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 在repeater itemcommand中获取下拉列表值_Asp.net_Delegates_Repeater - Fatal编程技术网

Asp.net 在repeater itemcommand中获取下拉列表值

Asp.net 在repeater itemcommand中获取下拉列表值,asp.net,delegates,repeater,Asp.net,Delegates,Repeater,我的Repeater itemdatabound是使用委托从oninit调用的。 现在,当我调用repeater的item命令时,它将调用OnInit事件。 我在中继器中有一个下拉框。该下拉列表将绑定到itemdatabound。所以,当我从下拉列表中选择任何值并单击submit时,它将再次调用item databound并再次调用selected index 0。因此,我无法将下拉选择值输入itemcommand 我们不是医生,我们需要看到代码才能提供帮助。请使用适当的代码编辑您的问题请尝试并

我的Repeater itemdatabound是使用委托从oninit调用的。 现在,当我调用repeater的item命令时,它将调用OnInit事件。 我在中继器中有一个下拉框。该下拉列表将绑定到itemdatabound。所以,当我从下拉列表中选择任何值并单击submit时,它将再次调用item databound并再次调用selected index 0。因此,我无法将下拉选择值输入itemcommand


我们不是医生,我们需要看到代码才能提供帮助。请使用适当的代码编辑您的问题请尝试并将其缩减为仅相关部分Sprivate void InitializeComponent{this.dgFixedDoddsBetList.ItemDataBound+=new RepeaterItemEventHandlerthis.Repeater1ItemDataBound;}受保护的覆盖void OnInItemEventArgs{this.InitializeComponent;base.OnInite;}现在用代码编辑您的问题…不要评论!包括所有相关内容,包括ASPX代码、任何动态控件的创建、repeater hander等
private void InitializeComponent() {
    this.dgFixedOddsBetList.ItemDataBound += new RepeaterItemEventHandler(this.Repeater1_ItemDataBound); 
    } 
protected override void OnInit(EventArgs e) {
    this.InitializeComponent();
    base.OnInit(e); 
}