Using Atlas with DropDownList (ASP.NET 2.0)

P

Piotrek

Hi all.

I am creating a web site, in which I would like to use Atlas.

I created an user control (Test1), in which there is a DropDownList
with some values. I set AutoPostbackProperty of this DropDownList to
true. In addition I created new event (TestEvent), which is fired when
selection is changed in DropDownList.

Then I placed this user control on my another page, in which I have
GridView, which displays some records from DB based on selected value
in DropDownList. I added UpdatePanel to the source, so only GridView
would be updated.

The problem is that when I select some value in DropDownList, then
whole page blinks. I think it is connected to AutoPostbackPropety. I
would like to eliminate this blinking.

BTW: When I set AutoPostbackProperty to false, then changing value in
DropDownList does nothing, but then clicking on some button causes that
everything works fine. It would be ok, but I don't want my users to be
forced to click some button after selecting some value.

Here is my code:
<atlas:ScriptManager ID="scriptMan" runat="server"
EnablePartialRendering="true">
</atlas:ScriptManager>
<uc1:Test ID="Test1" runat="server" />
&nbsp;
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
<br />
<atlas:UpdatePanel ID="up" runat="server" Mode="conditional"
RenderMode="Inline">
<Triggers>
<atlas:ControlEventTrigger ControlID="Test1"
EventName="TestEvent" />
</Triggers>
<ContentTemplate>
GridView is here
</ContentTemplate>
</atlas:UpdatePanel>

Thanks in advance,
Piotrek
 
G

Guest

You may want to set the AutoPostBack property to false. The idea with Atlas
is to avoid a postback and to use the facilities of the XMLHttpRequest object
in javascript to perform a "partial postback" to the server and avoid the
full refresh of the page as evidenced by the blinking to which you refer.
The idea is to refresh only those controls affected by the call through
XMLHttpRequest.

Hope this helps.

Good luck,
Eagle
 
G

Guest

Oh, yes. Have you added a client-side event handler on your dropdownlist to
respond on the client side to your selections? It is in that handler that
you should be able to get the behavior you are seeking.

Eagle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top