简体   繁体   English

SelectedIndexChange事件处理程序代码

[英]SelectedIndexChange event handler code

I am sort of stuck on the implementation. 我有点卡在实施上。

I am using Windowsforms with Oracle db 我正在将Windowsforms与Oracle数据库一起使用

I have a page with lot of controls including the DropDownList with subprograms (A,B, C..), a group of CheckBoxes and a yes/no DropDown . 我的页面上有很多控件,包括带有子程序(A,B,C ..)的DropDownList ,一组CheckBoxes和yes / no DropDown On the top of the page there is a DropDown with a list of subprograms (A, B, C..) as mentioned above. 在页面顶部,有一个DropDown有一个子程序列表(A,B,C ..)。

When A is selected from the DropDown the page should pull the existing data from the database, with the selected CheckBoxes and yes/no option selected from the databse. 当从DropDown选择A时,页面应从数据库中提取现有数据,并从数据库中选择选定的CheckBoxes和yes / no选项。 Then the user can make any updates by changing or adding a few selections and then hit save button to navigate to the next subprogram, B and then similar process repeats as above. 然后,用户可以通过更改或添加一些选择进行任何更新,然后单击保存按钮导航到下一个子程序B,然后重复上述类似过程。

I have 2 questions here: 1. I am looking to code the SelectedIndexChange event handler with a functionality to pull the data from the database (I mean user selections already made for CheckBoxes and DropDown 我在这里有2个问题:1.我正在寻找对SelectedIndexChange事件处理程序进行编码的功能,该功能可从数据库中提取数据(我的意思是用户已经为CheckBoxesDropDown做出选择

  1. I have a nextquestion_click event handler: On clicking this after the end of all the subprograms the user should be able to navigate to the nextquestion. 我有一个nextquestion_click事件处理程序:在所有子程序结束后单击它,用户应该可以导航到nextquestion。

Please provide me examples with sample code. 请提供示例代码示例给我。 Thanks in advance for the help. 先谢谢您的帮助。

  1. you can use .change() function of jQuery for dropdown. 您可以使用jQuery的.change()函数进行下拉。 When user will change the index of dropdown then this function will be called. 当用户更改下拉索引时,将调用此函数。 And you can use ajax to pull data from database. 而且,您可以使用ajax从数据库中提取数据。
  2. for nextquestion_click event, you can use .click() function of button and on click even you can use ajax to pull the next question from database and display it. 对于nextquestion_click事件,您可以使用button的.click()函数,并且在单击时甚至可以使用ajax从数据库中提取下一个问题并显示它。

Thanks, Amit Prajapati 谢谢阿米特·帕拉贾帕蒂(Amit Prajapati)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM