Datagrid paging problem

Discussion in 'ASP .Net Datagrid Control' started by Tony Girgenti, Oct 1, 2006.

  1. Hello.

    I'm developing and testing a web application using VS.NET 2003, VB, .NET
    Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2
    computer. I'm using a web form.

    When clicking on the "Next" button for paging in a datagrid, i get the
    following message:
    "A potentially dangerous Request.Form value was detected from the client
    (txtResponse="<TripExportDataObjec..."). "

    In trying to debug this problem, i discovered that if i put the
    ValidateRequest="false" in my @Page line, i don't get the error and it pages
    back and forth.

    Should i leave the ValidateRequest="false" in my @Page line, or try to
    figure out why this happens ?

    Also, why is it blowing up on the "txtResponse" textbox ?

    Any help would be gratefully appreciated.

    Thanks,
    Tony
     
    Tony Girgenti, Oct 1, 2006
    #1
    1. Advertising

  2. Hello Gaurav.

    Thanks for your reply, but i read all of that before posting here. I don't
    see how that helps me. I'm not entering text into a textbox and clicking a
    button. I'm clicking the paging button on the grid control.

    >> If you are really sure of what data you are expecting and how you would
    >> be

    working with it... go ahead and disable validation.<<

    That's my problem. I'm not sure. That's why i am asking here.

    Thanks,
    Tony

    "Gaurav Vaish (www.EdujiniOnline.com)"
    <> wrote in message
    news:%23j6Xo%...
    >
    >> Should i leave the ValidateRequest="false" in my @Page line, or try to
    >> figure out why this happens ?
    >>
    >> Also, why is it blowing up on the "txtResponse" textbox ?

    >
    > By default, a page does not accept the sequence starting with '<'.
    > See http://www.asp.net/faq/RequestValidation.aspx for a detailed
    > explanation.
    >
    > Short summary would be - to prevent any hacks arising out of elements like
    > <script>, <img> etc.
    >
    > If you are really sure of what data you are expecting and how you would be
    > working with it... go ahead and disable validation.
    >
    > Can do it in web.config -- for all pages at one go -- as well.
    >
    > <system.web>
    > <page validateRequest='false' />
    > </system.web>
    >
    > However, I would not recommend disabling validation at application level.
    >
    >
    > --
    > Happy Hacking,
    > Gaurav Vaish | www.mastergaurav.com
    > www.edujinionline.com
    > http://articles.edujinionline.com/webservices
    > -----------------------------------------
    >
    >
     
    Tony Girgenti, Oct 2, 2006
    #2
    1. Advertising

  3. Tony Girgenti

    Niraj Ranka Guest

    Hello,

    Are u using any kind of usercontol or custom control on your test page.
    This may post the << to the server.

    Do check the same.

    Regards
    --
    Niraj Ranka
    http://dotnetpub.blogspot.com/
    "Tony Girgenti" <tony(nospam)@lakesideos.com> wrote in message
    news:...
    > Hello Gaurav.
    >
    > Thanks for your reply, but i read all of that before posting here. I

    don't
    > see how that helps me. I'm not entering text into a textbox and clicking

    a
    > button. I'm clicking the paging button on the grid control.
    >
    > >> If you are really sure of what data you are expecting and how you would
    > >> be

    > working with it... go ahead and disable validation.<<
    >
    > That's my problem. I'm not sure. That's why i am asking here.
    >
    > Thanks,
    > Tony
    >
    > "Gaurav Vaish (www.EdujiniOnline.com)"
    > <> wrote in message
    > news:%23j6Xo%...
    > >
    > >> Should i leave the ValidateRequest="false" in my @Page line, or try to
    > >> figure out why this happens ?
    > >>
    > >> Also, why is it blowing up on the "txtResponse" textbox ?

    > >
    > > By default, a page does not accept the sequence starting with '<'.
    > > See http://www.asp.net/faq/RequestValidation.aspx for a detailed
    > > explanation.
    > >
    > > Short summary would be - to prevent any hacks arising out of elements

    like
    > > <script>, <img> etc.
    > >
    > > If you are really sure of what data you are expecting and how you would

    be
    > > working with it... go ahead and disable validation.
    > >
    > > Can do it in web.config -- for all pages at one go -- as well.
    > >
    > > <system.web>
    > > <page validateRequest='false' />
    > > </system.web>
    > >
    > > However, I would not recommend disabling validation at application

    level.
    > >
    > >
    > > --
    > > Happy Hacking,
    > > Gaurav Vaish | www.mastergaurav.com
    > > www.edujinionline.com
    > > http://articles.edujinionline.com/webservices
    > > -----------------------------------------
    > >
    > >

    >
    >
     
    Niraj Ranka, Oct 3, 2006
    #3
  4. Gaurav.

    I don't mind posting code or sending you an email. What code do you want ?

    I don't mind sending you my whole VS.NET solution.

    Thanks for your help.
    Tony

    "Gaurav Vaish (www.EdujiniOnline.com)"
    <> wrote in message
    news:...
    >> see how that helps me. I'm not entering text into a textbox and clicking
    >> a button. I'm clicking the paging button on the grid control.

    >
    > Do you have the code available?
    > Or can we see the page in action?
    >
    > Or if copyright is the issue, you may mail me at
    > gaurav[dot]vaish[AT]gmail[dot]com :)
    >
    >
    >
    > --
    > Happy Hacking,
    > Gaurav Vaish | www.mastergaurav.com
    > www.edujinionline.com
    > http://articles.edujinionline.com/webservices
    > -----------------------------------------
    >
    >
     
    Tony Girgenti, Oct 3, 2006
    #4
    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. =?Utf-8?B?UGF0cmljay5PLklnZQ==?=

    DataSet paging vs Datareader paging

    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    10,776
    Scott Allen
    Oct 8, 2004
  2. Roger
    Replies:
    0
    Views:
    970
    Roger
    Dec 28, 2004
  3. wh1974
    Replies:
    0
    Views:
    2,452
    wh1974
    Jan 12, 2005
  4. Red
    Replies:
    1
    Views:
    733
  5. Green Start Button

    DataGrid.Items.Count and DataGrid Paging...

    Green Start Button, Aug 4, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    5,836
    agravar
    Aug 2, 2006
Loading...

Share This Page