ボタンクリックイベントを使用してデータをgridviewにバインドし、templatefieldを使用してその1つをクリック可能に変更しましたが、ページロード時にgridviewをバインドすると、クリックする必要があるデータをクリックできますが、データをクリックすると問題が発生します。これは、このエラーを言う:ページロード時にgridviewをバインドするときのエラー
Invalid postback or callback argument. Event validation is enabled using 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.
私は今それを修正するGridView
コードを表示する必要があります。しかし、 'GridView'の' RowCreated'に 'GridViewRow.Cell'にクライアントサイドイベントを' Page.ClientScript.GetPostBackClientHyperlink'で登録する必要があります。 –
Page.ClientScript.GetPostBackClientHyperlinkでどのように登録すればよいですか? –
あなたの質問を編集し、あなたのコードを含めると、修正することができます。しかし、私はここで例を提供しています:http://stackoverflow.com/a/6250846/284240 –