Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi can anyone tell me how can i search and Update my User control using textChenged event on a Modal popup without closing the Popup ?

I have this Dynamic User control that containts TextBox and GridView

The Master page ImageButton supplies the GridView Datasource and the shows the User Control which displays the data

VB
Protected Sub imgBtn2_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgBtn2.Click
        Dim MyController As Control = LoadControl("~/UserControl/MyUserControl.ascx")

        Dim gv As New GridView
        gv = CType(UCBranch.FindControl("gvBranch"), GridView)
        gv.DataSource = MyDatatable
        gv.DataBind()
        LoadUserContrl.Controls.Add(MyController)
        MPEUC.Show()
End Sub


This is my MyUserControl.ascx

GridView
XML
<div class="GVData">
        <asp:GridView ID="gvBranch" runat="server" AutoGenerateColumns="False" EnableViewState="false">
            <Columns>
                <asp:BoundField DataField="BLoc" HeaderText="Location">
                </asp:BoundField>
        <asp:BoundField DataField="Bname" HeaderText="Name">
                </asp:BoundField>
            </Columns>
        </asp:GridView>
</div>


my TextBox for searching


XML
<asp:UpdatePanel ID="UpdateP1" runat="server" UpdateMode="Conditional">
                  <Triggers>
                      <asp:AsyncPostBackTrigger ControlID="txtSearch" EventName="TextChanged" />
                  </Triggers>
                  <ContentTemplate>
                      <asp:TextBox ID="txtSearch" runat="server" EnableViewState="true" OnTextChanged="txtSearchBCode_TextChanged"></asp:TextBox>
                  </ContentTemplate>
              </asp:UpdatePanel>
Posted
Comments
Karthik_Mahalingam 22-Jan-14 8:26am    
what issue you are facing ?
iMaker.ph 22-Jan-14 8:30am    
I cannot fire the TextChange event of my TextBox
TextBox and GridView are in the same User Control

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