literal field type (v2021)

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
ahmed7
User
Posts: 97

literal field type (v2021)

Post by ahmed7 »

Hello
Is there any way to make field type (literal) in v21?
I mean it can take a value (from expression or default value) and show in (view , edit) pages without ability of edit.
thanks


MichaelG
User
Posts: 1095

Post by MichaelG »

You can set the field to ReadOnly in Page_* server events. For example:

Field.ReadOnly = true;


ahmed7
User
Posts: 97

Post by ahmed7 »

Is the same (readonly) in edit page ?
if yes , so it will make field literal but with not saving the data.
i need to saving this data


ahmed7
User
Posts: 97

Post by ahmed7 »

MichaelG wrote:

You can set the field to ReadOnly in Page_* server events. For example:

Field.ReadOnly = true;

its been literal but not saving the data.


MichaelG
User
Posts: 1095

Post by MichaelG »

For edit page, you can simply enable the Read Only option (under Fields -> Edit Page -> Read Only).


Post Reply