私.aspx
は次のように見えます:
<div id="valueIntroduction" type="text" class="labelarea" runat="server">
<input name="$labeluniversityid" type="text" id="labeluniversityid" style="color:#7D110C;border:0;background-color:#C0D5F2;width:100%" />
</div>
.cs ファイルは次のようになります。
if (results.Read())
{
labeluniversityid.value = results["TEXT_CONTENT"].ToString();
}
まさにやろうとしているのは、データベースからデータを取得してvalueIntroduction
divに表示することです。それはうまくいっています。readonly
モード付きのテキストボックスを追加しました。私のページでEDIT
ボタンを押すと、値を編集できるようになります。