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

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on June 20, 2025, 11:20