PC Review


Reply
Thread Tools Rate Thread

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

 
 
Smith
Guest
Posts: n/a
 
      9th Nov 2009
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>
 
Reply With Quote
 
 
 
 
dotNetDave
Guest
Posts: n/a
 
      11th Nov 2009
Without using JavaScript, you will have to use an UpdatePanel.

David


======================================
David McCarter [Microsoft MVP]
www.dotNetTips.com
David McCarter''''s .NET Coding Standards available at:
http://codingstandards.notlong.com


"Smith" wrote:

> 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>
> .
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX Modal Popup Not Returning Current Control Values Mike C. Microsoft ASP .NET 0 19th Sep 2008 08:46 PM
using Ajax Modal popup fran_j_diaz@yahoo.fr Microsoft ASP .NET 2 24th Apr 2008 01:10 PM
AJAX Modal Popup SE.Computerguy Microsoft ASP .NET 4 11th Sep 2007 03:40 PM
AJAX Modal Popup disappearance Samuel Rhodes Microsoft ASP .NET 1 20th Apr 2007 05:01 PM
AJAX.net modal popup Not Me Microsoft ASP .NET 3 8th Jan 2007 09:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:03 AM.