Where does the data ("22") come from? Is it already in Umbraco or a calculation? Or something else?
In case it is data stores in Umbraco or it is a simple calculation, you could build the whole line "Hallo. My name ... 22 years old." in xslt or razor. I'm just wondering what is the reason for making a usercontrol for printing "22"...?
I need to create macros for user to acces data from a sql database in an easy way, they will not have the knowlegde to create the scripts needed to create the whole line in your example.
Macro in line with content
Hi. I am new to Umbraco and I could not find my way around this issue:
I am trying to have a macro (a .NET user control) together with some content on a page. The content (text) and the macro should be on the same line.
For example, I should be able to display:
"Hello. My name is John and I am 22 years old." (Where 22 comes from my .NET user control).
I have tried different solutions including:
Hi Stefan
Where does the data ("22") come from? Is it already in Umbraco or a calculation? Or something else?
In case it is data stores in Umbraco or it is a simple calculation, you could build the whole line "Hallo. My name ... 22 years old." in xslt or razor. I'm just wondering what is the reason for making a usercontrol for printing "22"...?
Hi.
The value comes from a sql database after being altered by several calculations (in the code behind of the user control)...
I am new to Umbraco and I could not find another way of achieving this.
I would appreciate your help. How could I access the database in an xslt script?
Hi again
I need to create macros for user to acces data from a sql database in an easy way, they will not have the knowlegde to create the scripts needed to create the whole line in your example.
is working on a reply...