Adding Html from Code Behind in Asp.net

前端 未结 5 834
面向向阳花
面向向阳花 2020-12-17 09:38

I want to add HTML structure and control like this from code behind into a panel

First Name
5条回答
  •  鱼传尺愫
    2020-12-17 09:55

    1. Take one local string variable TEMP.
    2. Create same html as you want to display on screen and store it in variable TEMP.
    3. You can take html creation of control in separate function based on requirement.
    4. Place that created html as innerHTML to your panel/div.

    That's it...

提交回复
热议问题