Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7791971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:03:35+00:00 2026-06-01T22:03:35+00:00

I have a db that stores exception messages. I would like to create a

  • 0

I have a db that stores exception messages.
I would like to create a query that gets these exceptions but instead of dumping huge amounts of text i would prefer it to be “on demand”.

I figured putting the exception into an anchor tag like so and then reading the message when needed by mousing over it would work… apparently not.

var logsForErrors = (from error in Logs
         select new {
              error = LINQPad.Util.RawHtml("<a title='"+ error.Exception+"'></a>"),
              errorDate = error.Date,
              errorMessage = error.Message
         }).Take(10);

logsForErrors.Dump();

This is throwing an exception (lol) – “Cannot parse custom HTML: “

Encoding the exception message

...RawHtml("<a title='"+ Uri.EscapeDataString(error.Exception)+"'></a>")

Message Could not translate expression ‘RawHtml(((“h__TransparentIdentifier0.error.Exception)) +
“‘>”))’ into SQL and could not treat it as a local expression.
will generate a new error

Any ideas? – I am open to alternative solutions to this also.

I just want a container for the message instead of it just dumping right into the output as it it so huge!.

Thanks,
Kohan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T22:03:36+00:00Added an answer on June 1, 2026 at 10:03 pm

    Have you tried using the “Results to DataGrids” mode in the recent betas? It might do just what you need without having to write anything else.

    Edit: your error was probably due to emitting HTML without escaping the text. The easiest solution is to call Util.RawHtml with an XElement instead of a string. You could write an extension method that does what you want like this:

    public static class Extensions
    {
        public static object Tooltipize (this string data)
        {
            if (string.IsNullOrEmpty (data) || data.Length < 20) return data;
            return Util.RawHtml (new XElement ("span", new XAttribute ("title", data), data.Substring (0, 20)));
        }
    }
    

    Put this into My Extensions and you can use it from any query.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to have a single location where exception messages are stored (these
I have a table that stores all the volunteers, and each volunteer will be
I have a trigger that stores changes made in a separate table when a
I have a table that stores user information. The table has a userid (identity)
I have a class that stores paths to CSS and Javascript files in arrays.
I have a DB that stores different types of tasks and more items in
I have a file that stores exam scores for a class of students. I
I have an application that stores images in a database. Now I have learned
I have a table that stores various clients I have done work for, separated
I have a database that stores dates broken into int's. I.e. Day, Month and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.