Invalid postback or callback argument. problem

Discussion in 'ASP .Net' started by arnabit@gmail.com, Aug 6, 2007.

  1. Guest

    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
     
    , Aug 6, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    539
  2. kevin goff
    Replies:
    2
    Views:
    1,183
    ponyryd
    Aug 4, 2006
  3. JULO
    Replies:
    1
    Views:
    6,414
    ketanbece
    Oct 29, 2008
  4. Amil
    Replies:
    4
    Views:
    14,714
  5. Ray Stevens

    Invalid postback or callback argument.

    Ray Stevens, Mar 28, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    9,105
    Ray Stevens
    Mar 28, 2006
Loading...

Share This Page