Ajax Toolkit: Setting value of literal control from a textbox in modal popup

  • Thread starter Thread starter Smith
  • Start date Start date
S

Smith

Hi

How can I set the value of a Literal control from a TextBox residing in a
Modal Popup? Preferably without refresh.

TextLiteral.Text = TextTextBox.Text in TextSaveButton_OnClick? Is that the
way to go? To avoid refresh/postback I should place the entire table in an
UpdatePanel?

<table>
<tr>
<td>
<asp:Literal ID="TextLiteral" runat="server" />
</td>
</tr>
<tr>
<td>
<ajax:ModalPopupExtender tender ID="TextModalPopupExtender"
TargetControlID="TextButton" PopupControlID="TextPanel"
CancelControlID="TextCancelButton" OkControlID="TextSaveButton"
BackgroundCssClass="modalBackground" runat="server" /> <asp:Panel
ID="TextPanel" runat="server" Height="400" Width="640px"
CssClass="modalPopup"> <asp:TextBox Height="300px" ID="TextTextBox"
runat="server" Width="350px"></asp:TextBox> <asp:Button ID="TextCancelButton"
runat="server" /> <asp:Button ID="TextSaveButton" runat="server" />
</asp:Panel>
</ajax:ModalPopupExtender>
</td>
</tr>
<tr>
<td>
<asp:Button ID="TextButton" runat="server" />
</td>
</tr>
</table>
 
Back
Top