How would you mask data returned in a Dynamic Data for Entities website?
Posted
by David Stratton
on Stack Overflow
See other posts from Stack Overflow
or by David Stratton
Published on 2010-06-05T06:15:02Z
Indexed on
2010/06/05
6:22 UTC
Read the original article
Hit count: 282
ASP.NET
|dynamic-data
I'm doing this in Visual Studio 2008, not 2010, in case there is a relevant difference between the two versions of the Dynamic Data websites.
How would I mask data in the automatically generated tables in a Dynamic Data for Entities website?
The scenario is we have one table where we want to allow users to ENTER sensitive data, but not VIEW sensitive data, so...
(In the list below, I'm using "template" to mean "The web page generated automatically based on the schema and action. I'm sure that's the wrong terminology, but the meaning should be clear.)
- The "Insert" template should have the field's textbox available for the user to type a value in.
- The "Edit" template should have the field's textbox blanked out (empty string) regardless of what was in the field in the database in the first place, but the user should be able to type in new data and have it save
- The "View" template should either have the data for this field masked, or non-visible.
- The auto-generated table showing the list of records should also have this field masked or non-visible.
I can do this easily with standard Web Forms, but I'm having a hard time figuring this out in the Dynamic Data site I'm working on. Masking data is such a common task, I have to believe Microsoft thought of this and provided a way to do it...
© Stack Overflow or respective owner