.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

avoiding postback using updatepanel

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :ASP.Net

Hi All:
I have a tabe container enclosed in updatepanel. In one of tabs, I have added a gridview. When I click that tab, and then click a linkbutton "view products" gridview is shown but posback occurs even the whole tab container is enclosed in updatepanel. how to avoid postback on link click ( gridview load)

View Complete Post

More Related Resource Links

UpdatePanel - UpdateProgress only displays on initial postback



I'm having a somewhat odd issue, I'll do my best to explain it.

In a nutshell I have an UpdatePanel with an UpdateProgress item, first postback checks for warnings, if there are any they will be be displayed to the user as a JavaScript 'confirm' box. If the user clicks OK the next postback occurs to commit the change.

The UpdateProgress loading notification appears on the first postback but not on the second, even though both of them function correctly.  The buttons that trigger both postbacks are async postback triggers in the update panel, and both are inside the ContentTemplate.

It's not a huge problem, but it causes some confusion, has anybody ever seen this issue before?


Problem with UpdatePanel postback

Hello,I have a Modal Popup window, inside an Update Panel object, that has the following layout:A Title areaA Content area with a tabstrip of 5 tabsA footer area with two buttons (Save and Cancel) and an UpdateProgressIn 3 of the five tabs I have:an UpdatePanel (UpdateMode=Conditional) that wrapsA collection of LinkButtons objectA gridviewAnother Panel object to be showed as a Nested Modal PopupNO update ProgressBoth the link collection and the gridview Select event will open the nested Modal window that contains a custom Usercontrol that is used to add new or edit object of the related gridview like in the code sample below//click handler of the LinkButton protected void btnNewPhone_Click(object sender, EventArgs e) { //Setup properties of the UserControl code omitted // ... //Show the nested Popup this.mpePopupPhone.Show(); } //handler for the gridview selectedIndex event protected void gvPhones_SelectedIndexChanged(object sender, EventArgs e) { //Setup properties of the UserControl code omitted // ... //Show the nested Popup this.mpePopupPhone.Show(); } Please note that: I am using the ModalPopupExtender show/hide behaviors using only server-side code. Also, the ModalPopupExtender objects for nested modal windows does not have the OkControlID & CancelControlID set. As the content of nested modal window is only a single user contro

UpdatePanel postback and resulting ViewState

Hi everyone,I'm reading about the UpdatePanel and how it interacts with controls inside & outside of it.  My understanding is that the usual ASP.Net pipeline takes place when posting from within an UpdatePanel-- Page load etc all fire off as normal-- except when the prerendering stage is reached.  In that case the ScriptManager does a final check and only renders those controls within the UpdatePanel and skips the rest.  That's my understanding at least.Sounds good, but for argument's sake let's say I have a TextBox located outside an UpdatePanel.  If a postback occurs from within that panel, the TextBox's properties can still be set in the page load method, but those changes will not take effect. (normally; it is possible to postback the entire page from an UpdatePanel)Is that correct?  What happens to that TextBox's ViewState in this instance?  Is it updated based on what happened to it in the page load method or is that modification tossed out because it wasn't in the UpdatePanel?

textbox not writable after partial postback of updatepanel

hi, i got a strange problem. my project was ok before implimenting ajax. i have just implimented ajax in one page only with Tabcontainer and updatepanels only nothing else. almost all controls are devided into different Tabs with respective update panels. mostly it is working ok. but the problem is : 1.   in some controls i am not able to write anything even the control is "Enabled=True" and focus is on the same control after partial postback. 2.   and as soon as i press Tab control goes to Address bar. 3.   some time tab key is also not working.Why ? here some code :<td style="width: 57684px; text-align: left">                                                Inception Date (dd-mm-yyyy)</td>                                            <td style="width: 604px; text-align: left">              &n

Margin on div removed after async postback with UpdatePanel

Hi I have a series of div's inside an update panel, these divs have a margin-bottom defined in css. In IE8, when I do a async postback these margins are all removed. All the other styles are fine. If I turn on compatibility mode this does not happen. In Google Chrome the margins are maintained correctly after the async postbacks. Any idea why this is happening? -- Christian 

Button forces postback in updatepanel inside Popup

I have an update panel which is inside a Modal Popup Extender. When I click the Refresh Report button it always calls a postback. I need to stop it from posting back. Ideas?

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" />

Updatepanel reacting to exteral postback command dispite UpdatePanelUpdateMode being set to Conditio


I have a page with about a dozen update panels.  This morning I updated one to work with a Timer and delay the loading of content for speed reasons.  Now this web part wants to updated everytime a postback is submitted on another web part.  I feel I'm missing something simple but can't put my finger on it.  I have included my CreateChildControls() subroutine.  I have made sure the updatepanels had IDs and set  the ChildrenAsTriggers property to true but neither of these seem to help.  The webpart updates by going just going blank.

    public class myClasses : WebPart

        private UpdatePanel _masterPanel;
        private UpdatePanel _upDatePanel;
        private String _errorMessage = "";
        private String _username;
        DropDownList _siteTypeSelection;
        private Timer _loadTimer = new Timer();
        private Image _loadingImage = new Image();

        protected override void CreateChildControls()

RegisterStartupScript and UpdatePanel - Execute JS Function after postback




Is there a way for me to call a js function that I have registered the first time after a post back of an update panel?


In the first initial request to the page I register a script block and it works fine.

BUt it doesnt not fire or execute when the updatepanel does a post back.


I did a simple test and just did and page.ClientScript.reg...('alert("test"))

the code works so dont worry about my example syntax. I t just does an alert. The alert is executed once when the page was first requested. but not after a post back.  any ideas?




Button not preserving ID after partial postback in updatepanel?


I've created a dynamic button from another control outside of the update Panel.  The button is given an ID and such.  When the button is click, a postback occurs and I've re-created this button during Page_Init, Page_PreLoad, and Page_Onload and NONE of them is preserving the value. 

The only way for me to find the control was to look at the Page.request.form's allkeys and compare the string with a any text string that contains: Button.  Because I ID'd teh button as: ButtonRow_0Col0.  But the actual ID is null.  However, when traversing through page.request.form, the allkeys shows that ID with no problem.

So how come the actual ID is lost after a partial postback yet, the page.request.form's allkeys can pull out its allkey's value??


Updating updatepanel before postback completes



I'm running some server code that generates a bunch of status lines to the user. However, even though this is on an updatepanel, nothing happens before the function completes. Not really a surprise. However, I would like to be able to somehow update this field so that the user can see something actually happning while they wait.

Anyone know of a good way to do this?

Cheers! :)

Master page controls postback is not working with updatepanel


?Hi All,

I have a web page that contains an updatepanel, inside this there is a button with script in OnClick event.

While clicking the button am setting a text in the label control which is in the site.master

My problem is that label is not showing the text am setting (or postback for master control is not working).

Without updatepanel label is coming.


Thanks in advance



jQuery $(document).ready() and ASP.NET Ajax asynchronous postback

Many call it the ASP.NET jQuery postback problem, but using the technique below should make it no problem anymore. $(document).ready() isn't called after an asynchronous postback. What this means? You lose the functionality that should be executed within $(document).ready() after an UpdatePanel rendered its contents after an asynchronous postback.

jQuery live() and ASP.NET Ajax asynchronous postback

The issue is that normally $(document).ready() is called when the DOM is ready to be manipulated. But this doens't happen after an ASP.NET Ajax asynch postback occurs.

This means that the initial jQuery bindings won't be automatically available after the asynchronous postback is over. I underline "automatically" here because my last post describes more possibilities, how this issue can be worked around.

Maintain HTML Radio Button Selection Inside GridView After Postback

Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.

UpdatePanel is not a known element - message when upgrading to 1.0 ajax


It worked on one of my old pages.  I change the web.config, renamed all the <asp.

On some aspx page it doesn't recognize the updatepanel.  It only does on one page.  If I create a new aspx page with a different name - then it works.

Should I just create a new web project ajax - then copy all my code into there?  Or is there a way to get those old pages to recognize the new ajax controls?

Gridview inside updatepanel


I am displaying large amount of data in gridview,the gridview placed within updatepanel,every 1sec i am refreshing updatepanel using ajax timer.my problem is while displaying large data the cpu performance is low,pls give idea to increase cpu performance..

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