More improvements to registration, leaf input create, and charting
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System.Reflection;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace LeafWeb.WebCms.Utility
|
||||
{
|
||||
// stack overflow
|
||||
public class RequireRequestValueAttribute : ActionMethodSelectorAttribute
|
||||
{
|
||||
public RequireRequestValueAttribute(string valueName)
|
||||
{
|
||||
ValueName = valueName;
|
||||
}
|
||||
public override bool IsValidForRequest(ControllerContext controllerContext, MethodInfo methodInfo)
|
||||
{
|
||||
return (controllerContext.HttpContext.Request[ValueName] != null);
|
||||
}
|
||||
public string ValueName { get; private set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user