Home > Net >  What.net core can make asp - for obtaining a dynamic variable, and displayed
What.net core can make asp - for obtaining a dynamic variable, and displayed

Time:11-16

 

@ {
The codebehind (categories.aspx.cs) (" Title ")="Test";
String shape="Version";

}





Like the above code, the Version is a property of the model, how to use the @ shape to Version value, not only output "Version
"


The following line is used directly & lt; Label for asp -="Version" & gt; Achieve the effect, but now I want to use the @ shape, but the result is the effect of the first line,
But can you tell me how to replace the Version with @ shape

CodePudding user response:

You can, or written in MVC

CodePudding user response:

That could you tell me how to achieve specific change, my side F12 when see value="https://bbs.csdn.net/topics/Version", rather than the value of the Version: 1.3.3.7

CodePudding user response:

Correct a problem, then you are to continue the discussion, asp.net MVC core is not equal to the net core.

All kinds of garden up articles, blog has to have to explain to you

CodePudding user response:

Can reflect and then obtain advice but very troublesome in the codebehind (categories.aspx.cs) directly read data

CodePudding user response:

Don't reflect, more can write a method, with the switch input the name of the attribute returns the value of corresponding properties, or use a dictionary to save attribute names and values, defect is inflexible, and also tedious to write,
  • Related