Re: MaxHTMLLength and UpdatePanel

  •  04-02-2009, 8:42 AM

    Re: MaxHTMLLength and UpdatePanel

     
    Thanks, but that's not going to work with gridviews very well and doesn't "fit" with the way ASP.NET does validation.  For what its worth, I ended up removing the MaxHTMLLength Property and implementing a customvalidator.  This works both inside and outside a gridview and can implement validationgroups.
    <script type="text/javascript">
    function CheckLength (oSrc, args) {
    args.IsValid = (args.Value.Length <= 7000);
    }
    </script>
    <asp:CustomValidator ID="custEntry" runat="server" ErrorMessage="Must be less than 7000 encoded characters - Please shorten the entry." ClientValidationFunction="CheckLength" ControlToValidate="ceEntry" ValidationGroup="grpAddEntry" ValidateEmptyText="False" Display="Dynamic" />
     
     
View Complete Thread