Async Post Back - Lost Javascript and CSS after Async Post Back RRS feed

  • Question

  • User587691106 posted

    Hello Community,

    i have the following problem. I would like to fire an asyncpostback after the text changed in a textfield.

    The problem is, that i've styled my site with some css and JavaScript functions. After the Async Postback i lost some functionalities and CSS formating.  Can anybody help me with this problem? Here is my source code:

    C# Class:

    protected void txt_PartNr_TextChanged(object sender, EventArgs e)
                txt_PartNr.Attributes.Add("class", "red");

    ASPX Site:

    <asp:Content ID="ContentMain" ContentPlaceHolderID="MainContent" runat="server">
        <asp:UpdatePanel runat="server" ID="MainContentUpdatePanel" UpdateMode="Always">
                <div id="spaceContent">
                    <div class="row hide-on-med-and-down">
                <!-- Autogenerate new Claim Nr and fills it -->
                <div class="row card " style="margin-left: 5%;">
                    <div class="row">
                        <div class="input-field col s12 sickSignsOrange big">
                            <asp:Literal runat="server" ID="ltlReclaimNr" />
                    <div class="row">
                        <!--PartNr -->
                        <div class="input-field col s3 offset-s1">
                            <asp:TextBox runat="server" ID="txt_PartNr" AutoPostBack="true"/>
                            <label for="idPartNr">
                                <asp:Literal runat="server" Text="<%$Resources:sick.language, partNr%>" />
                <asp:AsyncPostBackTrigger ControlID="txt_PartNr" EventName="TextChanged"/>

    The Event works fine, but the problem is after the Event some other functions doesn't work (JavaScript and CSS Formats for Selections / Combobox).

    Thanks for your help.

    Thursday, April 21, 2016 8:35 AM


All replies