hi
I used mega menu in page but when use it this error happen:
A potentially dangerous Request.Form value was detected from the client (hdnFieldID=" <span class="dc-mega...").
Description: ASP.NET has detected data in the request that is potentially dangerous because it might include HTML markup or script. The data might represent an attempt to compromise the security of your application, such as a cross-site scripting attack. If this type of input is appropriate in your application, you can include code in a web page to explicitly allow it. For more information, see http://go.microsoft.com/fwlink/?LinkID=212874. Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (hdnFieldID=" <span class="dc-mega...").
this was code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('li a').on('click', function () {
localStorage.setItem("SelectedMenu", $(this).innerHTML);
$('#hdnFieldID').val(localStorage.getItem('SelectedMenu'));
});
});
</script>
so I change code:
localStorage.setItem("SelectedMenu",$(this).find('span')[0].innerHTML);
and error doesn't happen but now problem is that mega menu doesn't work correctly it worked correctly when I write this code:
localStorage.setItem("SelectedMenu", $(this).finnerHTML);
best regards
neda