1

I'm attempting to pass a time value as a string, however the encoding for the : colon is not working. It's displaying as %3a in the URL (/Edit/9%3a45), but when clicked on, the page says

A potentially dangerous Request.Path value was detected from the client (:)

What can I do?

dav_i
  • 27,509
  • 17
  • 104
  • 136
  • possible duplicate of [MVC WEB API routing fails when url contains encoded ampersand](http://stackoverflow.com/questions/14359305/mvc-web-api-routing-fails-when-url-contains-encoded-ampersand) – Cory Nelson Jan 16 '15 at 21:07
  • Due to security reasons asp.net is treating this as an xss attack. You could send it via http request body. – Martin Lantzsch Jan 16 '15 at 21:08
  • what is the problem with HHMMss ? – i486 Jan 16 '15 at 21:15

1 Answers1

-1

Transfer it using Session:

Session["DateValue"]=yourDateTime;

How to take it after that:

if(Session["DateValue"] != null)
{
    DateTime time = (DateTime)Session["DateValue"];
}   

You can check this tutorial Tutorial

mybirthname
  • 17,949
  • 3
  • 31
  • 55