Click here to Skip to main content
15,894,343 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
Why is it that My TextBoxChange Event on my modal popup not firing when ever I unfocus my Textbox

I Set the OntextChange = TextBoxChange , Set AutoPostBack = True

But i can't debug my aspx.vb file.

same goes with my gridview in the Modal popup

ASP.NET
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>            
                <ajaxToolkit:ToolkitScriptManager ID ="ToolkitScriptManager1" runat ="server"></ajaxToolkit:ToolkitScriptManager>
                <asp:HiddenField ID = "HiddenField1" runat="server" />                          
            <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="divPopUpBranch"
                        TargetControlID="hidden"
                        PopupDragHandleControlID="panelDragHandleDiv"
                        BackgroundCssClass="ModalStyle">
            </ajaxToolkit:ModalPopupExtender>
            <div id="div1" style="display: none;">
                <asp:Panel runat="Server" ID="panel1" CssClass="drag">
                    <div class="gridContainer">
                        <asp:PlaceHolder ID="LoadUserContrl" runat="server"></asp:PlaceHolder>    
                    </div>
                    <div class="closeContainer">
                        <div class="closeButton">
                            <asp:Button ID="Button1" runat="server" Text="Close" />
                        </div>
                    </div>
                </asp:Panel>
            </div>        
        </ContentTemplate>        
    </asp:UpdatePanel>

My User Control asp Code
ASP.NET
<asp:UpdatePanel ID="UpdateBcode" runat="server" UpdateMode="Conditional">    
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="txtSearchBCode" EventName="TextChanged" />
                    </Triggers>
                    <ContentTemplate>                            
                        <asp:TextBox ID="txtSearchBCode" CssClass="WriteBackColor" runat="server" Style="text-transform: uppercase;
                                width: 60px;" Width="89px" EnableViewState="true" AutoPostBack="true" 
                                MaxLength="3"></asp:TextBox>                   
                    </ContentTemplate>
                </asp:UpdatePanel>


VB
Protected Sub txtSearchBName_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtSearchBName.TextChanged
       Dim Input As String = Server.HtmlEncode(Trim(Me.txtSearchBName.Text))
       If Page.IsPostBack Then
           Me.gvBranch.DataSource = SearchBy("name", Input)
           Me.gvBranch.DataBind()
       End If
   End Sub
Posted
Updated 17-Jan-14 22:53pm
v4
Comments
Salman622 17-Jan-14 13:39pm    
can you explain the flow of this page so that i can give you a solution
iMaker.ph 18-Jan-14 4:52am    
ok

1. Master Page Which have
ImageButton To show the modal popup that contains my User Control
TextBox which value will came from my User Control
2. Once ImageButton is Click
The Onclick Event will loads/pass a DataTable to my User Control PageLoad then
Modal popup will show
3. On the PageLoad of my User Control DataTable will be the source of my GridView
4. On my User Control
I Have a TextBox and a GridView, When Ever I hit Enter/Tab I want to Search on the GridView to Display the Data and then Select the Item to passed to My Master Page Textbox

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900