会话值存储在两列而不是一列中

时间:2015-07-14 19:44:05

标签: c# asp.net session cookies

我遇到以下代码的问题。当我点击Repsendbtn时,它会将UsrNme的相同会话值存储到ReceiverSender列,其中应将会话值保存到Receiver并导入{{ 1}} Sender

的值
tolbl

代码:

<asp:FormView ID="repmsgform" runat="server"  DataKeyNames="mailno" Width="100%" >
    <ItemTemplate>
        <div class="col-lg-12"> 
            <form class="well span8">
               <div class="row">
                   <div class="span3">
                      <label>From</label> 
                      <asp:Label ID="tolbl" runat="server" CssClass="form-control" Text='<%# Bind("Receiver") %>'></asp:Label> 
                      <label>To</label>
                      <asp:Label ID="frmlbl" runat="server" CssClass="form-control" Text='<%# Bind("sender") %>'></asp:Label>
                      <label>Ads Title</label>
                      <asp:Label ID="MsgTitLbl" runat="server" CssClass="form-control" Text='<%# Bind("Mestitle") %>'></asp:Label>
                      <asp:Label ID="adsnummsglbl" runat="server" Text='<%# Bind("AdsID") %>' Visible="false" ></asp:Label>
                      <asp:Label ID="mailnolbl" runat="server" Text='<%# Bind("mailno") %>' Visible="false" ></asp:Label>
                  </div>
                  <div class="span5">
                     <label>Message</label> 
                     <asp:TextBox ID="TextBox15" runat="server" TextMode="MultiLine" Height="150px" CssClass="form-control"></asp:TextBox>
                     </textarea>
                  </div>
                  <asp:Label ID="msgsentlbl" runat="server" Font-Size="Medium" ForeColor="#669900"></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;
                  <asp:Button runat="server" ID="Repsendbtn" Text="Send" CssClass="btn btn-primary pull-right" OnCommand=" Repsendbtn_Command"  CommandArgument='<%# Bind ("mailno") %>'/>&nbsp;&nbsp;&nbsp;&nbsp;
                  <asp:Button ID="Closebtn" runat="server" Text="Close" CssClass="btn btn-default pull-right" OnCommand=" Closebtn_Command" />
             </div>
          </form>
       </div>
    </ItemTemplate>
</asp:FormView>

0 个答案:

没有答案