Show property value in webpart ascx

Lennard van Diggelen asked on September 14, 2016 12:20


I've made a web part with some properties and I'm getting my data by code behind. Currentyl I want to show the value in my ascx file but it is only showing when i use <%= LocationAddress %>.

However when you are within the admin environment and on the design tab of a page you get errors about the <%...%> usage.

Should I use a different method to show these values within my ascx file?

Thanks in advance!

Correct Answer

Juraj Ondrus answered on September 14, 2016 12:38

Due to the life cycle the code blocks are not supported. I would recommend following the approach descrbid in the The Controls collection cannot be modified... article.

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.