2

I have a question for web service. I have been testing but not sure what is causing this. I am trying to prevent my web page from flickering when there is a post back. So I used web service. It is working fine without any noticeable flickering when I put my dropdownlist on a normal page (without Master page). However, when I moved the same code to page with master page, then the flickering happens. Anyone has any ideas how to fix this please? My html mark up is as below:

<div>
    <div>
        <asp:DropDownList ID="ddlState" runat="server" AutoPostBack="True"></asp:DropDownList>
    </div>
     <div>
        <asp:DropDownList ID="ddlCity" runat="server" DataTextField="city_name" DataValueField="city_id"></asp:DropDownList>
    </div>
</div>

I am trying to avoid using update panel. Thanks

loveprogramming
  • 538
  • 2
  • 5
  • 22

1 Answers1

1

You will get the flikering as long as you have postback, you can use ajax call to refresh only part of page for instance drop down. One of easiest solution is to use UpdatePanel or you can use jQuery ajax. This article explains how you can make cascading dropdowns using jquery ajax with asp.net.

Adil
  • 146,340
  • 25
  • 209
  • 204
  • I am trying to avoid using updatepanel. I read articles about using jQuery Ajax. What I am trying to understand why my code behave differently when it's on a normal page and on a master page. – loveprogramming Nov 26 '13 at 08:19
  • @asplearning I advice you don't use update panels. check it out http://stackoverflow.com/questions/22466/jquery-ajax-vs-updatepanel – panky sharma Nov 26 '13 at 08:35