ページに、ユーザーがこの情報を送信したときにユーザーと電子メールをリストするテーブルがあります。このテーブルに投稿ごとに行を追加し、他の行を削除しないようにするにはどうすればよいですか?
私のaspx
<table id="tblUsers" class="table table-bordered table-striped">
<tbody id="tbodyUser">
<tr>
<asp:Label ID="lblHeader" Font-Bold="true" runat="server" Visible="false">User to Access</asp:Label>
<td>
<asp:Label ID="lblUser" runat="server" Visible="false"></asp:Label>
</td>
<td>
<asp:Label ID="lblEmail" runat="server" Visible="false"></asp:Label>
</td>
</tr>
</tbody>
</table>
私の .cs
protected void btnSendUser_OnClick(object sender, EventArgs e)
{
string LoginInfo = txtUserAdd.Text;
PrincipalContext insPrincipalContext = new PrincipalContext(ContextType.Domain, "x.com", "amsndrsecuritysqlser", "xxx");
UserPrincipal insUserPrincipal = UserPrincipal.FindByIdentity(insPrincipalContext, LoginInfo);
//it's to first post
if (lblUser.Visible == false && lblEmail.Visible == false)
{
if (insUserPrincipal == null)
{
lblError.Visible = true;
}
else
{
lblUser.Visible = true;
lblEmail.Visible = true;
lblHeader.Visible = true;
lblUser.Text = insUserPrincipal.GivenName + " " + insUserPrincipal.Surname;
lblEmail.Text = insUserPrincipal.EmailAddress;
}
}
}