我的标签:这里提到了标签,后面是代码。
<div id="valueIntroduction" class="labelarea" runat="server"> </div>
<div class="line"></div>
<div id="valueBacklog notice" class="labelarea"> </div>
<div class="line"></div>
<div id="valueReasonably complete" class="labelarea"> </div>
<div class="line"></div>
<div id="valueStatement of purpose" class="labelarea"> </div>
<div class="line"></div>
<div id="valueResume" class="labelarea"> </div>
<div class="line"></div>
<div id="valueTranscripts" class="labelarea"> </div>
<div class="line"></div>
<div id="valueGRE Official test scores" class="labelarea"> </div>
<div class="line"></div>
<div id="valueTOEFL or IELTS Official test scores" class="labelarea"> </div>
<div class="line"></div>
<div id="valueLetters of Recommendation3" class="labelarea"> </div>
<div class="line"></div>
<div id="valueLetters of Recommendation2" class="labelarea"> </div>
<div class="line"></div>
<div id="valueLetters of Recommendation1" class="labelarea"> </div>
<div class="line"></div>
<div id="valueSignature" class="labelarea"> </div>
<div class="line"></div>
<div id="valueSubject" class="labelarea"> </div>
<div class="line"></div>
此代码将最后一条记录分配给第一个标签。如何将正确的记录分配给正确的标签?
if (Department.Items[0].Selected)
{
firstPanel.Visible = true;
myLegend.InnerText = "Informatics";
NewComm.CommandText = "getTextHeaderINFO";
NewComm.CommandType = CommandType.StoredProcedure;
NewComm.Connection = NewConn;
NewComm.CommandTimeout = 3000;
SqlDataReader results = NewComm.ExecuteReader();
while (results.Read())
{
Response.Write(results["TEXT_CONTENT"].ToString());
valueIntroduction.InnerHtml = results["TEXT_CONTENT"].ToString();
}
}