User1694517121 posted
Having a little trouble with the UIHint attribute. Specifically I need to use one field template during the insert and another during the edit. Is there a way to do this with the UIhint attribute? I've tried modifying one template to detect
when the action is insert and do one thing and when it's edit do another. However, doing this in the template always returns the action as a null result. The code I'm using in the field template is this
RouteData route = DynamicDataRouteHandler.GetRequestContext(Context).RouteData;
DynamicDataRoute ddRouteData = route.Route as DynamicDataRoute;
string action = ddRouteData.Action;
from here: http://justgeeks.blogspot.com/2010/11/getting-action-or-dynamicdataroute-from.html
But, it would work equally well to simply have one template that acts like an edit template on insert but not on edit and another that works as an edit on the edit and not on insert.
Any way to specify which mode a UIHint works for?
Thanks in advance.