Introducing ReUI:Open-source UI components and apps built with React, Next.js and Tailwind CSS
Browse ReUI

ASP.Net Core Error in AddHtmlAttribute


public void AddHtmlAttribute(string scope, string attributeName, string attributeValue)
{
SortedDictionary<string, string> attributes = new SortedDictionary<string, string>();
if (_htmlAttributes.ContainsKey(scope))
{
attributes = new SortedDictionary<string, string>(_htmlAttributes[scope]);
}
else
{
attributes = new SortedDictionary<string, string>();
}

attributes[attributeName] = attributeValue;
_htmlAttributes[scope] = attributes;
}

i keep on receiving this error

System.ArgumentException: 'An item with the same key has already been added. Key: [body, System.Collections.Generic.SortedDictionary`2[System.String,System.String]]'


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Metronic_asp.net-core_v8.2.8



Hi,

Sorry for the late reply.

We've double-checked this version but are still unable to reproduce the issue. Could you provide detailed steps to help us replicate the error?

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,

Sorry for the late reply.

We checked the latest Metronic version and were unable to reproduce this error.
Could you please clarify which Metronic version you are using?

Also, please let us know if there are any specific steps to reproduce this error.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(