Invalid postback or callback argument. problem

A

arnabit

Hi everyone,

I am trying to create conrol dynamically. i am using the following
code..inside pageload

if (!IsPostBack)
{
string qry_fwd = qry.Substring(qry.IndexOf("and"));
Session["qry_fwd"] = qry_fwd;

qry = qry.Substring(0, qry.IndexOf("and"));


// for checking the type of qyery..

flag = checkqry_type(qry);


if (flag == true)
{


int k = qry.LastIndexOf(">");

string qry_CreateControl = qry.Remove(k + 1);

string qry_execute = qry.Remove(0, k + 1);


ControlDef(qry_CreateControl,
PlaceHolderControls);
ExtractControls();


}
else
{
//WebPortalReporting.ControlDef c = new
ControlDef(qry, PlaceHolderControls);
ControlDef(qry, PlaceHolderControls);
ExtractControls();
Session["qry"] = qry;
}


////if second type of query

}
else
{
string qry_fwd = Session["qry_fwd"].ToString();
qry_fwd = qry_fwd.Substring(0,
qry_fwd.IndexOf("completion"));

ControlDef(qry_fwd, PlaceHolderControls);
ExtractControls();
}



but when ever a button is pressed i get the following error-


"Invalid postback or callback argument.

Event validation is enabled using <pages enableEventValidation="true"/
in configuration or

<%@ Page EnableEventValidation="true" %> in a page.


i have tried to solve the problem by sdetting the value of Page
EnableEventValidation to false.but it also gives an error -"parameter
name can not be null"

Please sujjest a way to proceed.

Thanks in advance,
Arnab
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top