Open Closed

How to Use abp-input by passing "Object Model as a string" #2312


User avatar
0
viswajwalith created
  • ABP Framework version: v4.4
  • UI type: MVC
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

We would like to create a Input control by passing the Object Model in a dynamic way,

In the above example we want to pass the RecordNo as a string (at run time) and render the abp-input control. for Example:

or

Do u have any way for that? Please advise.


1 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    asp-for property type is ModelExpression and it's not related to ABP.

    You can create PropertyExpression on your own for your model https://docs.microsoft.com/en-us/dotnet/api/system.linq.expressions.expression.property?view=net-6.0

    And you can create a new ModelExpression with that expression. You can pass that dynamic ModelExpression to asp-for property.


    Or you can use the already implemented Dynamic Forms feature of ABP Framework

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11