第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

無效的回發(fā)或回調(diào)參數(shù)。使用‘<Pages enableEventVal環(huán)流=“true”/>’

無效的回發(fā)或回調(diào)參數(shù)。使用‘<Pages enableEventVal環(huán)流=“true”/>’

慕森卡 2019-06-24 11:08:01
無效的回發(fā)或回調(diào)參數(shù)。使用‘<Pages enableEventVal環(huán)流=“true”/>’當(dāng)我從客戶端回發(fā)一個頁面時,我會得到以下錯誤。我在客戶端有修改asp:ListBox的JavaScript代碼。我們怎么解決這個問題?錯誤詳細(xì)信息如下: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 during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.ArgumentException: 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.Source Error:An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
查看完整描述

3 回答

?
胡說叔叔

TA貢獻(xiàn)1804條經(jīng)驗 獲得超8個贊

在PageLoad事件中有代碼嗎?如果是,那么也許通過添加以下內(nèi)容會有所幫助。

if (!Page.IsPostBack){ //do something }

當(dāng)您單擊命令并再次運(yùn)行Page_Load時,將引發(fā)此錯誤,在正常生命周期中,PageLoad->ClickonCommand->Page_Load(再次)->ProcessItemCommand事件


查看完整回答
反對 回復(fù) 2019-06-24
?
慕運(yùn)維8079593

TA貢獻(xiàn)1876條經(jīng)驗 獲得超5個贊

我有過使用DataGrid的經(jīng)驗。其中一列是“選擇”按鈕。當(dāng)我單擊任何行的“選擇”按鈕時,我收到了以下錯誤消息:

“無效的回發(fā)或回調(diào)參數(shù)。在頁面中使用配置或<%@Page EnableEventVal環(huán)流=”true“%>啟用事件驗證。出于安全考慮,此功能驗證回發(fā)或回調(diào)事件的參數(shù)是否來自最初呈現(xiàn)它們的服務(wù)器控件。如果數(shù)據(jù)有效且預(yù)期,請使用ClientScriptManager.RegisterForEventValidation方法注冊回發(fā)或回調(diào)數(shù)據(jù)以進(jìn)行驗證?!?/trans>

我修改了幾個代碼,最后成功了。我的經(jīng)驗路線:

1)我將頁屬性更改為EnableEventValidation="false"但沒起作用。(這不僅出于安全原因是危險的,我的事件處理程序也沒有被調(diào)用:void Grid_SelectedIndexChanged(object sender, EventArgs e)

2)我實施了ClientScript.RegisterForEventValidation在渲染方法中。但沒起作用。

protected override void Render(HtmlTextWriter writer){
    foreach (DataGridItem item in this.Grid.Items)
    {
        Page.ClientScript.RegisterForEventValidation(item.UniqueID);
        foreach (TableCell cell in (item as TableRow).Cells)
        {
            Page.ClientScript.RegisterForEventValidation(cell.UniqueID);
            foreach (System.Web.UI.Control control in cell.Controls)
            {
                if (control is Button)
                    Page.ClientScript.RegisterForEventValidation(control.UniqueID);
            }
        }
    }}

3)我將網(wǎng)格列中的按鈕類型更改為PushButtonLinkButton啊,真靈!(“ButtonType=”LinkButton“)。我認(rèn)為如果您可以將按鈕更改為其他控件,如”LinkButton“,在其他情況下,它會正常工作。


查看完整回答
反對 回復(fù) 2019-06-24
  • 3 回答
  • 0 關(guān)注
  • 378 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號