当我从客户端发回页面时,我收到以下错误.我有JavaScript代码修改客户端的asp:ListBox.
我们如何解决这个问题?
错误详情如下:
Server Error in '/XXX' Application.
--------------------------------------------------------------------------------
Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Description: An unhandled exception occurred …我需要在ASP.NET下拉服务器控件中对下拉列表选项进行分组.你对如何处理这个问题有任何想法吗?我是ASP.NET的新手.

我有一个表单和一个按钮形式:
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="SubmitData"  />
我的c#程序中有一个方法.该方法被调用SubmitData
但是我也想在这个按钮点击上运行一个javascript函数.我该怎么做呢?
这是我的javascript函数:
var selectedLanguages = new Array();
jQuery('#lstProblems option:selected').each(function() {
    selectedLanguages.push(jQuery(this).val());
});
我从这里得到它:jquery listbox返回用户选择的内容
我怎么运行它?我必须把它放进<script></script>去做一些功能(等等......)?