I am using html to display an image on my server in an app.
I want to make one of the folders in the image string a variable. what would be the best way to do that?
I would like to search and replace a /##Folder##/ variable in the html string, and then use a variable in the HTML property, but not sure how to do that. If I use the search and replace, where should the html text be that is processed?
That might be one way to do it, is there another way?
Can I do a search and replace on the HtmlContent2.HTML for example?
Hello Donald,
The HtmlContent control is a bit special, since we can't access their HTML variable in runtime. In fact probably we can do it using Javascript, however, such variable is plained to used at designtime, commonly to put inside one or more variables. Then this variables are parsed in compile time and therefore become available at runtime.
Therefore, probably what you can do is to think about variables, because variables can be changed at runtime. Then, for example, if you shown an image in your HTMLContent control using a code similar to this:
In the app's view Show event we can set the variable to this:
And then, in every other place (a Push Button's Click event, for example) we can place another similar code:
Also, we can made the entire HTMLContent control a variable, that is, we can simply place inside something like "[MyVariable]", then we can change the content of that variable at runtime.
Hope this can help you in some manner Donald. :)
Hi,
Will this logic work with audio file?
Hello,
Hi,
Will this logic work with audio file?
Yes, edunt. In principle, the HTMLContent control can contains any HTML and app variables.
Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.