Error message is changed when get the callback results on client side in ASP.NET RRS feed

  • Question

  • User-1470493789 posted

    I have the following code, to perform callback on client side:

    ' get reference of call back method named CallbackComplete 

    Dim cbref As String = Page.ClientScript.GetCallbackEventReference(Me, "arg", "CallbackComplete", "context", "ClientCallbackErrorFunction", False)

    ' Generate JS method trigger callback

    Dim cbScr As String = String.Format(("function PerformCallBack(arg, context) {{ {0}; }} "), cbref)

    Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "PerformCallBack", cbScr, True)

    when error is thrown the function ClientCallbackErrorFunction is raised with parameters arg,context.

    I sent with args the error message that I want to show, but it seems that this message is concatenated with another long message (the blue is the message that I sent, and the red is the strange string):

    Duplicate value occurred! 384|JPRavzqJvmeNDt60MNw6IWxtPY20FejJ6aLI6nMFm5F6WcmnW4N94uyDxWQajpuciqnrg7YMl0Tjolt/rkNg5/ntRXeoZ0TTo5eAI/QReU4QAr2CfbgpELLA4G8PcBROrD4g24kpHikX9cI8Kety5ooa5tR0jh5f3wQIC2FQ5Pay1ZXRzkolpvUoICDfZBSPBAqYwYfft6EdIC4JmdUkrXZMmln1Rn2YZ+oAE7G7kesLBJt5XmWSBNWhF7jpYbwRcQu2irunP2p7WYKO1grcQW+J91Y4gi77VY+dGwf7s3H2xt1rKWudgtOmaxzsEWVEYxHTxBGrtGiTGDRT0zUvXWkZHxncmQZF191OhCm7pHF1bGIR3kIKZPf6DRNQYOXG

    what I can do to prevent concatenation on error message? I don't know this string come from?!

    Saturday, May 23, 2020 12:52 PM

All replies