0
votes

I have created a sample update panel in visual webpart in sharepoint 2013. this code is working with default master page (seatle) but when i applies custom master page it would not work.

<div>
    <br />
    <asp:UpdatePanel ID="upSetSession" runat="server">
        <ContentTemplate>
            Current Time:
            <asp:Label ID="lblTime" runat="server"></asp:Label><br />
            <asp:DropDownList ID="ddlMyList" runat="server" OnSelectedIndexChanged="ddlMyList_SelectedIndexChanged"
                AutoPostBack="true">
                <asp:ListItem>Select One</asp:ListItem>
                <asp:ListItem>Maybe</asp:ListItem>
                <asp:ListItem>Yes</asp:ListItem>
            </asp:DropDownList>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="ddlMyList" EventName="SelectedIndexChanged" />
        </Triggers>
    </asp:UpdatePanel>
</div>

and code behind is :

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void ddlMyList_SelectedIndexChanged(object sender, EventArgs e)
    {
        lblTime.Text = DateTime.Now.Second.ToString();
    }

I had already checked scriptmanager tag and webpart manager inside the sharepointform tag in custom master page.

1
Got the answer in some blog <script type='text/javascript'> _spOriginalFormAction = document.forms[0].action; _spSuppressFormOnSubmitWrapper=true; </script>Ankur

1 Answers

1
votes

Finally I got the answer. I have to use some script like

<script type='text/javascript'>
  _spOriginalFormAction = document.forms[0].action;
  _spSuppressFormOnSubmitWrapper=true;
</script>

Reference