common errors

“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.”
Answer :
——–

# re: EnableEventValidation error on button postback using a multipart form in .NET v2.0 I had a similiar problem. I fixed it by putting my databinding code in the Page_Load event in a !Page.IsPostBack block. I got the solution here:

2]Invalid attempt to read when no data is present
answer
——–

reader  obj should  use  as  shown  below

sqlReader = sqlCmd.ExecuteReader();
sqlReader.Read();

txtBkNum_brw.Text = sqlReader["BookNumber"].ToString();
txtBookTtl_brw.Text = sqlReader["BookTitle"].ToString();
txtAuth_brw.Text = sqlReader["Author"].ToString();
comboBox1.Text = sqlReader["Category"].ToString();

sqlReader.Close();

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.