相关疑难解决方法(0)

无效的回发或回调参数.使用'<pages enableEventValidation ="true"/>'启用事件验证

当我从客户端发回页面时,我收到以下错误.我有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 …
Run Code Online (Sandbox Code Playgroud)

.net asp.net postback argumentexception .net-2.0

233
推荐指数
14
解决办法
59万
查看次数

如何在ASP.NET下拉列表中添加选项组?

我需要在ASP.NET下拉服务器控件中对下拉列表选项进行分组.你对如何处理这个问题有任何想法吗?我是ASP.NET的新手.

我的要求.

c# asp.net

29
推荐指数
3
解决办法
5万
查看次数

asp.net:点击运行javascript?

我有一个表单和一个按钮形式:

<asp:Button ID="Button1" runat="server" Text="Button" OnClick="SubmitData"  />
Run Code Online (Sandbox Code Playgroud)

我的c#程序中有一个方法.该方法被调用SubmitData

但是我也想在这个按钮点击上运行一个javascript函数.我该怎么做呢?

这是我的javascript函数:

var selectedLanguages = new Array();
jQuery('#lstProblems option:selected').each(function() {
    selectedLanguages.push(jQuery(this).val());
});
Run Code Online (Sandbox Code Playgroud)

我从这里得到它:jquery listbox返回用户选择的内容

我怎么运行它?我必须把它放进<script></script>去做一些功能(等等......)?

html javascript c# asp.net

1
推荐指数
1
解决办法
4367
查看次数

标签 统计

asp.net ×3

c# ×2

.net ×1

.net-2.0 ×1

argumentexception ×1

html ×1

javascript ×1

postback ×1