私.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();
}
まさにやろうとしているのは、データベースからデータを取得してvalueIntroductiondivに表示することです。それはうまくいっています。readonlyモード付きのテキストボックスを追加しました。私のページでEDITボタンを押すと、値を編集できるようになります。