2012-04-29 21 views
0
Dim ds As New DataSet 
     ds = executeCommand("update travels set travelpackageid='" & txtCMUser.Text & "' , no_of_person='" & txtMem.Text & "', book_date='" & txtArrivalv.Text & "',type_of_vechile='" & DropDownListTypevechile.Text & "',travel_package='" & DropDownListPackages.Text & "' where cust_id =") 

に私は私の旅行のテーブルを更新するには、このクエリを使用していますが、私はエラー以下の取得:更新クエリは、VB.NET

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.

は、このエラーを整理するために私を助けてください。

+0

http://xkcd.com/327/十分に言われました。ああ、どこにこのコードを書いていますか?どのイベントですか?周囲のコードも投稿できますか? –

+0

Eugeneが答えているように、実行時にコマンド文字列を作成するのではなく、パラメータ(例:SqlParameter)を使用してSQLインジェクションから保護する必要があります –

答えて

0

入力文字列の1つに「<」という文字があります。

あなたのご意見をお寄せいただければ幸いです。そうでない場合、bad thingsが発生する可能性があります。