How do I fill a form using a modal popup?

garrymoore

New Member
I have an asp.net address form with a bunch of text boxes (street, number, city, postal code, etc.) and an AJAX modal-popup-extender.When a button is pressed, an address-book is shown (in the modal popup) where the user can search and select one of his registered addresses. This list is implemented using a GridView and works very well. Each row has a link-button like this:\[code\]<asp:LinkButton ID="AddressNameLinkButton" runat="server" CausesValidation="false" CommandArgument='<%# Container.DataItem("ADDRESS_ID") %>' CommandName="Select" Text='<%# Eval("ADDRESS_NAME")%>' />\[/code\]When the button is pressed, this code-behind runs:\[code\]Protected Sub AddressGridView_RowCommand(...) Handles AddressGridView.RowCommand Dim ADDRESS_ID As Long = e.CommandArgument If e.CommandName.CompareTo("Select") = 0 Then 'Some code that retrieves the information 'of the selected address goes here. CityTextBox.Text = City PostalCodeTextBox.Text = PostalCode 'Etc. Etc. SearchModalPopupExtender.Hide() End IfEnd Sub\[/code\]Problem is, while this code hides the modal-popup, it does not fill the address form.How do I fill the form from the modal popup?
 
Back
Top