0

In a contentpage have some text field and button when click this button reload the master page actually I want to not reload masterpage but the contentpage......thanks in advance

 <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>

           
                <div class="col-md-6 col-sm-12 col-xs-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">&nbsp;&nbsp;<i class="fa fa-dollar" aria-hidden="true"></i>&nbsp;&nbsp;User Information</h3>
                        </div>
                        <div class="panel-body">
                            <h6>&nbsp;&nbsp;User Name</h6>
                            <asp:TextBox ID="tbxUserName" CssClass="form-control" runat="server"></asp:TextBox>
                            <div class="row">
                                <div class="col-md-4">
                                    <h6>&nbsp;&nbsp;Password</h6>
                                    <asp:TextBox ID="tbxPassword" CssClass="form-control" runat="server"></asp:TextBox>
                                </div>
                                <div class="col-md-8">
                                    <h6>&nbsp;&nbsp;Browse Image</h6>
                                    <asp:FileUpload ID="FileUpload1" runat="server" />

                                </div>
                            </div>
                           
                            <asp:Button ID="btnAddUser" Style="margin-top: 20px; width: 220px; border-radius: 25px" CssClass=" pull-right btn btn-primary hvr-bounce-out" runat="server" Text="Add User" OnClick="btnAddUser_Click" />

                        </div>
                    </div>
                </div>

            </div>

        </ContentTemplate>

                             <triggers>                             
                               <asp:PostBackTrigger ControlID="btnAddUser"/>                            
                            </triggers>
    </asp:UpdatePanel>
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Suman
  • 53
  • 11
  • `` does not work inside an UpdatePanel (when they are used to upload files as part of an asynchronous postback). There are plenty of open-source alternatives for the FileUpload that do work inside an UpdatePanel; Google is your friend. – sh1rts Jan 24 '17 at 01:24

1 Answers1

0

Try to use asp:AsyncPostBackTrigger Simple PostBackTrigger should reload the whole page.

For a better explanation you can read: https://www.asp.net/web-forms/overview/older-versions-getting-started/aspnet-ajax/understanding-asp-net-ajax-updatepanel-triggers

BarArp
  • 21
  • 3
  • When i use asp:AsyncPostBackTrigger 'FileUpload1' is null that's reason i'm not using this....have you any idea to perform this task but not reload masterpage thanks in advanced – Suman Jan 23 '17 at 16:53
  • Take a look at the answer Win wrote for this question http://stackoverflow.com/questions/26389522/asp-net-fileupload-in-updatepanel-still-not-working – BarArp Jan 24 '17 at 10:28