Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

unable to restrict post back event in update panel

Posted on 2009-04-07
3
Medium Priority
?
416 Views
Last Modified: 2012-05-06
am working with grid with in repeater. i kept the whole repeater and grid in AJAX update panel. the page is getting postbacked even though i set UpdateMode="Conditional" for my update panel. why its happening like this
any suggestions

thanks in advance
chaitu

<asp:UpdatePanel ID="upPanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
<asp:Repeater ID="rptRecentFeeds" runat="server" EnableViewState="true">
 <ItemTemplate>
                                    <asp:HiddenField ID="hf1" runat="server" Value='<%# Eval("id") %>' />
 
                                    <div id="header">
                                        <div id="name-02">
                                            <asp:Label ID="name" runat="server" Text='<%# Eval("name") %>'></asp:Label></div>
                                    </div>
 
<div id="bubble">
<asp:GridView ID="dglist1" GridLines="None" EnableViewState="true" AllowPaging="true"
                                                        PageSize="1" runat="server" ShowHeader="false" ShowFooter="false" AutoGenerateColumns="false"
                                                        OnPreRender="FeedsGrid_PreRender" OnPageIndexChanged="IndexChanged" OnPageIndexChanging="dglist1_PageIndexChanging"
                                                        OnRowDataBound="dglist1_OnRowDataBound" EnableSortingAndPagingCallbacks="true">
                                                       
                                                        <Columns>
                                                            <asp:TemplateField ItemStyle-HorizontalAlign="Left">
                                                                <ItemTemplate>
                                                                    <div id="message" align="left">
                                                                        <div id="message-text">
                                                                            <asp:Label ID="messave" runat="server" Text='<%# Eval("text")%>'></asp:Label>
                                                                        </div>
                                                                    </div>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
</div>
 
                                </ItemTemplate>
</asp:repeater>
 
    </ContentTemplate>
    </asp:UpdatePanel>

Open in new window

0
Comment
Question by:cool_lancers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Accepted Solution

by:
GiftsonDJohn earned 2000 total points
ID: 24094342
Hi,

UpdateMode=Conditional will not supress any postbacks. It deals with how the contents of the UpdatePanel should get refreshed.

UpdateMode=Always ==> will always refresh the contents of the UpdatePanel after every async postbacfk.
UpdateMode=Conditional ==> will refresh the contents only when you call UpdatePanel1.Update() from your code behind.

I can't see any problem with your code. But you have to make sure that ajax extensions and the relevant  tags in web.config are enabled on your projects.
0
 
LVL 9

Expert Comment

by:VikramMullick
ID: 24094456
Can't see any triggers associated , you need to have them whem update mode is conditional.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question