How do I get a value from an asp:textbox into an asp:textbox in a modal window.

siraero

Active member
Joined
Jan 21, 2012
Messages
32
Programming Experience
Beginner
Hi
I have a mail subscription script, and its working, like this.
VB.NET:
<div class="block-content"> 
        <div class="form-subscribe-header">Sign up for our newsletter</div> 
            <label for="newsletter">Sign Up for Our Newsletter:</label> 
            <div class="input-box"> 
                <asp:TextBox ID="newsletter" runat="server" CssClass="input-text required-entry validate-email" Text="Tilmeld dig til vores Nyhedsbrev"></asp:TextBox> 
                 
            </div> 
            <div class="actions"> 
                <asp:ImageButton runat="server" ID="btnSubscribe" ImageUrl="~/add/image/btntilmeld.png"></asp:ImageButton> 
            </div> 
                 
        </div>

Now I want to take the value fron the asp:textbox to a asp:textbox inside a modal popup.
I have the code for the popup and its working.
VB.NET:
<form id="form1" runat="server"> 
    <asp:ToolkitScriptManager ID="ScriptManager1" runat="server"> 
</asp:ToolkitScriptManager> 
    <div> 
    <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="lnkPopup" PopupControlID="panEdit" BackgroundCssClass="modalBackground" CancelControlID="btnCancel" PopupDragHandleControlID="panEdit"> 
 
</asp:ModalPopupExtender> 
 
  
 
<asp:Panel ID="panEdit" runat="server" Height="180px" Width="400px" CssClass="ModalWindow"> 
 
        <h1>Edit</h1> 
 
        <table width="100%"> 
 
            <tr> 
 
                <td class="formtext" style="height: 23px; width: 150px;" align="left"> 
 
                    Fields1: 
 
                </td> 
 
                <td> 
 
                    <asp:TextBox ID="txtFields1" runat="server"></asp:TextBox> 
 
                </td> 
 
            </tr>            
 
       </table> 
 
       <br /> 
 
</asp:Panel> 
 
<!-- <a id="lnkPopup" runat="server">Show Popup</a> --> 
<input type="button" id="lnkPopup" title="Button" /> 
    </div> 
    </form>

but i can only get the popup to work with a input type button or an a link.
If i changes the asp:button or asp:imagebutton ID, from the mailscript to lnkPopup, it will note open the popup.

so i hope someone can help me.
How do i put the 2 script together so i can:
- use the asp:textbox as now with asp:RegularExpressionValidator, and if this is OK
- then when hit submit the mail will be send to the modal popup to the asp:textbox inside that and the popup will ofc. be showed
- when hitting the asp:imagebutton if its possible to use this to activate the modal popup.Hope someone can help me.
Thx.
 
Top Bottom