Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のページには、データベースに接続してデータを取得する瞬間があります。特別なフィールドの1つはhtmlコードです。私はそれを理解するいくつかのコントロール内のhtmlとして私のページにそれを表示したいと思います。私のオプションは何ですか?
リテラルを使用します。
.aspx:
<asp:Literal runat="server" ID="myLiteral" />
コードビハインド:
myLiteral.Text = "<h2> this is a h2 html tag</h2>";
これは印刷されます