Validate Input - Best practice

4 posts, 0 answers
  1. Jack
    Jack avatar
    128 posts
    Member since:
    May 2003

    Posted 04 Feb 2014 Link to this post

    Hi,

    When using the grid to input content through the edit form templates for example.
    How are people validating the input against script attacks and such.

    Cheers,

    Jon
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Feb 2014 in reply to Jack Link to this post

    Hi Jack,

    Please go through this documentation to know about validation settings in Radgrid.
    Validation
    Also take a look at this demo to know more about its working when using EditForms.
    Grid - Flexible Server-Side Validation

    Thanks,
    Princy
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jack
    Jack avatar
    128 posts
    Member since:
    May 2003

    Posted 05 Feb 2014 Link to this post

    Thank you Princy,

    Do most people use Server.HTMLEncode  on the the output to the grid?

    Cheers,
    Jack
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 Feb 2014 in reply to Jack Link to this post

    Hi Jack,

    I'm not clear about your requirement. The RadControls which use the HtmlEncode property are RadGrid and RadTreeList, more specifically - all their columns that are inherited from GridBoundColumn\TreeListBoundColumn. Incase you need HtmlEncode you can use a GridBoundColumn with HtmlEncode property set.

    Thanks,
    Princy
Back to Top