How to read validation control error messages in validation summary messagebox from local resource files RRS feed

  • Question

  • User-1723792589 posted

    I need to read error message of validation controles (RequiredFeildValidator) from resource files in my App_LocalResource folder as my web app is multilingual....

    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                            ControlToValidate="ddlTicketType" ErrorMessage="Ticket type required." 
                            ForeColor="White" InitialValue="Select" SetFocusOnError="True" 
                            ValidationGroup="tkt" meta:resourcekey="RequiredFieldValidator4Resource1">*</asp:RequiredFieldValidator>

    and the key "RequiredFieldValidator4Resource1" is existed in resource file as some text...but it is not picking up the exact value, rather it is showing some unreadable content......

    I changed my ValidationSummary to ShowMessageBox="False" & ShowSummary="True" and it works, it showed me desired result.....i want them to be work in Message Box too.....

    Every other thing are working fine, like text in labels and in other controles like buttons, hyper links are coming correctly.....

    Thursday, September 27, 2012 9:20 AM


  • User-1723792589 posted

    after scracthing my head for so many days, finally i found answer for this...the javascript alert and validation control message box uses your local computer language & cultural...i have enabled it for the culture i want and it worked like a charm...thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 3, 2012 5:25 AM