.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

UpdatePanel in .Net 4 - Causing Full Page Postbacks

Posted By:      Posted Date: September 12, 2010    Points: 0   Category :ASP.Net
Hi Guys,I've just updated a website from 3.5 to 4.0 and I've noticed that paging controls and command buttons in update panels cause full page postbacks (where they never use to in my 3.5 version).Any ideas why this might be?Cheers,Andrew

View Complete Post

More Related Resource Links

Page.FindControl Causing Null Reference Exception


Hi guys,

I developed a page in VWD 2008 and it works perfectly locally, but when I deployed it on the server every Page.FindControl() call is causing the NullReference Exception "Object reference not set to an instance of an object. " Can anyone help me out? Code is below


Mike Marshall

            For i As Integer = 1 To 10
                If (CType(Page.FindControl("last_" & i), TextBox).Text.Length > 0) Or (CType(Page.FindControl("first_" & i), TextBox).Text.Length > 0) Or (CType(Page.FindControl("dob_" & i), TextBox).Text.Length > 0) Then
                    Dim person_entry(7) As String
                    person_entry(0) = info_list.Count - 1
                    person_entry(1) = CType(Page.FindControl("last_" & i), TextBox).Text
                    person_entry(2) = CType(Page.FindControl("first_" & i), TextBox).Text
                    person_entry(3) = CType(Page.FindControl("dob_" & i), TextBox).Text
                    person_entry(4) = CType(Page.FindControl("appear_" & i), TextBox).Text
                    person_entry(5) = CType(Page.FindControl("mental_" & i), TextBox).Text
                    person_entry(6) = CType(Page.FindControl("behave_" & i), TextB

Change part of a page without full postback


I have a page with two columns. Initially, the left column will contain a list of links that are article titles. Clicking on one of the links will display the text of the article in the right column, keeping the list of titles in the left column. Clicking on another title will clear the text of the first article and display the second. Is there a way to accomplish this without having to repaint the whole page? I would rather not have the whole page resent each time a title is clicked, but rather have the page stay as is and only the contents of the right column get cleared and redisplayed. I assume there's a way to do this with JavaScript, but I don't know how and would appreciate some help. Thanks!

$.ajax post from asp.net page and __viewstate causing call to fail



Now I know that I won't be sending viewstate and eventvalidation in my ajax calls and that I will only want to send the actual form fields for efficiency purposes but I will need to know the answer to this question, to inform the more junior members of the team and my manager, so if anyone has any answers they are most welcome.

I have a simple form as follows

<form id="form1" runat="server"> 
<p>Field1: <

Getting the exact page causing an error using Server.GetLastError

Using vb.net/asp.net 2005.in the global.asax page in the application error page I am getting the exception information as follows: Dim CurrentException As Exception = Server.GetLastError() Dim ErrorDetails As String = CurrentException.Message.ToString & "<br><br>" & CurrentException.ToString() To find out when there are any exceptions when users are using the system, then the ErrorDetails are being auto-emailed to members on the IT team to help in troubleshooting.The problem is this:  I want to find out what page is the user is on when the exception happens, sometimes the stacktrace does not list the aspx page.  Does anyone know how to get this information?thanksMC

AutoPostback in Repeater in UpdatePanel is refreshing the page

Here's quite a weird problem:I've got a TextBox with AutoPostBack="true" and OnTextChanged property set.The textbox is located inside a Repeater, which in turn is located inside an UpdatePanel.Problem is - whenever the TextBox postsback, the whole page gets reloaded, instead of the UpdatePanel only.Here's how the thing looks:<asp:UpdatePanel runat="server"> <ContentTemplate> <asp:Repeater ID="itemsRepeater" runat="server"> <HeaderTemplate> <ul class="lstProducts"> </HeaderTemplate> <ItemTemplate> <li> <asp:TextBox AutoPostBack="true" OnTextChanged="whatever_Click" runat="server" /> </li> </ItemTemplate> <FooterTemplate> </ul> </FooterTemplate> </asp:Repeater> </div> </ContentTemplate> </asp:UpdatePanel> Interesting thing is, if I take the TextBox out of the repeater, it refreshes only the UpdatePanel.So is if I put a Button inside the repeater - only the UpdatePanel gets refreshed.But whenver I place an AutoPostBack-ing control inside the Repeater, the whole page gets refreshed.Any help would be welcomed,Thanks<asp:UpdatePanel runat="server">             &

Consistently running out of page file memory with full text indexer

Using MS SQL Server 2008 SP1 x64 Standard Edtion on Windows 2008 R2 Enterprise, I'm about to full-text index for the first time 1 table and 2 views. The table contains about 250'000 entries with a data space of 180 MB. As soon as I activate the full text indexing, the fdhost.exe task starts to consume slowly but surely all the available page file space (this can be easily watched using the Resource Monitor and the Commit Charge graph on the memory tab). Once all the virtual memory has been consumed, the server becomes unusable since it can't open any new windows any more, and RDP stops working. The machine specs are as follows: 12 GB of RAM 80 GB free on hard disk out of 136 GB 8 CPUs Custom size paging file with sizes between 24 GB - 60 GB (originally, this was system managed size, but then the server ran out of memory sooner) Max SQL server memory set to 6 GB (first 10 GB, then 8 GB) I've set the max fulltext crawl range to 8. During the indexing, the 8 CPUs are bit busy for a while, but not excessively. What is astonishing is that there is almost no use of physical memory during the indexing (I can see an increase from 2 GB to 3 GB which still leaves plenty of RAM available). Does anybody have an idea how I can convince fdhost.exe to consume physical memory and leave the paging memory alone? Or what else can I try?

PageViewerWebPart content url redirects to a full page

I have a many pages that contain the mentiond webpart, and it works swimmingly.  However there are a few links that re-direct and open a full page in the browser, and not in the webpart :( I am fairly sure that there is no way to stop this with out access to the javascript or url (which i may have access to eventually). I am curious if anyone else has experinced this small snafu and what, if any, was your work around. Regards, max   ps i coded and added this in C#, hence the post in the programming sub-forum.

Full Control users only able to edit Shared Version of page in MOSS 2007

Hi, In MOSS 2007 we have a site collection that does not allow the owners to edit pages. There is no broken inheritance in the permissions, and when a user clicks "Site Actions" and then "Edit" they get a toolbar saying they are only editing the Shared Version of the page. No pages are checked out to any other users either and the users attempting this (including the Farm account) are not able to edit these pages. What would be the next steps to debugging this problem as it is not one I have encountered previously?  

Adding Trigger To UpdatePanel from Content Page

Hi guys,    I got an updatepanel which contains a normal panel on MasterPage. The updatepanel does not contain content place holder. On the content page, I have to add triggers to updatepanel for buttons that are dynamically created on "page_load" event. The problem is that, since the page_load event of content page is being called before master page's page_load event, UpdatePanel is not being created. So that, whenever i try to add triggers in page_load event of content page, i got an error like "A control with ID 'ctl00$editableContent$ctl42' could not be found for the trigger in UpdatePanel 'up1'." How can I resolve this problem? The code below is for adding triggers to updatepanel for buttons.MasterClass master = (MasterClass)Page.Master;            AsyncPostBackTrigger trig = new AsyncPostBackTrigger();            trig.ControlID = button.UniqueID; // i have tried button.ID but that does not work as well :)                        trig.EventName = "Click";            master.UpPanel.Triggers.Add(trig);Regards,Kemal

perform UpdatePanel.Update from different page

I have Page_A.aspx and Page_B.aspx Page_A.aspx has a text box and a Send button. Page_B.aspx has a Label control on it, inside an UpdatePanel I want that when I type something in Page_A.aspx and click Send, the text of Label on Page_B.aspx should be  updated with the text box text and the UpdatePanel should be updated. Is this possible? Page_A.aspx:<asp:TextBox runat="server" ID="ssMessage"></asp:TextBox> <asp:Button runat="server" ID="ssSendButton" Text="Send" OnClick="SendMessage" />   Page_B.aspx:<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Label runat="server" ID="ssCommonRoom"></asp:Label> </ContentTemplate> </asp:UpdatePanel>  

Adding UpdatePanel in Application Page


Hi Folks,

      I have a ApplicationPage where i have dropdown and a commandButton.I need to use updatepanel for on dropdown Ctrl and Button ctrl.How can we do it?

have addeed the below code for adding updatepanel for

              <asp:UpdatePanel ID="upTroubleCode1" runat="server" UpdateMode="Always" >

        <ContentTemplate >
        <asp:Button ID="btnSubmit" runat="server" Text="Submit" Width="89px" Font-Size="Medium" BackColor="#CF0000" ForeColor="White" OnClick="btnSubmit_OnClick" />

 so when we click on Button nothing is happening.

How we can add updatepanel for DropDown and as well CommandButton


Thanks & regards


UpdatePanel Trigger dont work with Master Page



I got a aspx page using a master page. In the aspx page, i got multiple Content section:

<asp:Content ID="Content1" ContentPlaceHolderID="CPHSubHeader" runat="server">

<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">

<asp:Panel ID="Panel1" runat="server">
            <asp:table id="tblSubHeader" runat="server" width="100%" bgcolor="white">
              <asp:TableRow runat="server">
                <asp:TableCell ID="TableCell1" runat="server" Width="50">
                    <asp:Label runat="server" Text="Area" Font-Names="Arial" Font-Size="14px"></asp:Label>
                <asp:TableCell ID="TableCell2" runat="server" Width="100">
                    <asp:DropDownList runat="server" ID="ddlArea" AutoPostBack="true" OnSelectedIndexChanged="DDLArea_SelectedIndexChanged"></asp:DropDownList>
                <asp:TableCell ID="TableCell3&q

Full PostBack in IE and Partial PostBack in other browsers using an UpdatePanel


I have an UpdatePanel that works fine and always updates the content when the RadioButtonList selected index is changed. What I want to do, is trigger full page postback in IE, but allow the UpdatePanel to do partial page postback in all other browsers.

Here's my markup (I removed the internals of the UpdatePanel since they are not relavent):

<asp:UpdatePanel ID="uplPodcasts" ChildrenAsTriggers="false" UpdateMode="Conditional" runat="server">
                    <div id="plPodcastsControls">
                	    <span style="font-weight: bold; line-height: 26px;">Display Mode:  </span>
                        <asp:RadioButtonList ID="rblPodcastsDisplay" CssClass="rblPodcastsDisplay" 

                            <asp:ListItem Selected="true" Text="Table" Value="table" />
                            <asp:ListItem Text="Grid" Value="grid" />

__doPostBack(); causing a full postback


Hi guys,

I've just tried my hand at using __doPostBack(); but it seems to be causing a full postback rather than just a partial.

Can anyone explain why?

I'm using the following code:

__doPostBack('UpdatePanel2', '');

Where updatepanel2 is what I would expect to update.

Persisting DropDown List attributes accross page Postbacks


Can anyone advice how can DropDownList attributes be persisted accross page Postbacks?


DropdownList1.AutoPostBack = True

On Postback the attribute is no longer available (ie. attributes.count=0).
I tried persisting using the code below, but was unsuccessful:

Before PostBack: ViewState.Add("DDL","DropdownList1")
On PostBack: DropdownList1 = ViewState("DDL")

This generated the error: DropDownlist is not marked as serializable.

I than tried:

Before PostBack: Session.Add("DDL","DropdownList1")
On PostBack: DropdownList1 = Session("DDL")

This did not err but attributes were still not available.

Ideas Anyone?








Href hover causing page to flicker



I have a link in my page. When the user hovers over the link, the page is flickering.

This is the code I have used

 color: #42C0FB; background: inherit; 
 font: normal 11px auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
 line-height: 1.8em;

 color: #6C757A; background: inherit; 
 font: normal 11px auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;

<a href="WelcomePage.aspx?UserName=User_nm" id="Welcome" title="Home Page" target="_blank">Welcome to my Page</a>


I am checking in IE 6 and IE 7.
How to avoid the flickering, when user hovers over the link.

Thank you

ASP.NET partial page upload without Updatepanel /With jQuery and example


I have an ASPX page .In the Top i am displaying 5 categories (Ex : Pen,Book,Shoe,Mobile,Mirror) When i click on any of the categories,I want to show the products under that category below the header. I dont want to reload the entire page for this.I want to maintain my page as it is (The header,footer and side panels would ) when a click happens except the center place of the image (may be a DIV or Table to show Product). Whats the best way to do this ?.I dont want to go for the ASP.NET Ajax update panel.I am already using jQuery in my project.So is there anyway to do this with jQuery ? Please advice .Thanks in advance

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend