Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search


AJAX :: Enabled Page_load Event Firing Twice?

I have a page on which there is a textbox that is in update panel and has text changed event and autopostback=true. On the same page there is a 'Retrieve' button outside the updatepanel. Now what is happening is if user inputs data in the textbox and clicks retreive button page_load event isfiring twice which is not what should be happening, one time its the partial postback due to the text changed event and second time is the page post back. I would like to restrict the second postback.

View 6 Replies (Posted: Dec 04, 2009 12:04 AM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Forms Data Controls :: Set A LinkButton's Enabled And Visible Properties In The Page_Load Event
i am currently trying to set a LinkButton's Enabled and Visible properties in the Page_Load event. The LinkButton is a delete control for a gridview. My reason for needing to do this is to only allow deleting in the gridview for certain login roles. The following is what I currently have and throws a 'Object reference not set to an instance of an object.' exception.


Posted: Sep 24, 2009 09:58 PM

View 2 Replies!   View Related
[C#] Nested Master Page Not Firing Page_Load Event?
I have used the information from MSDN to create a nested master page. I want a main master page for my site, and a nested master page for my Administration panel. In the CS code for the nested master, I am checking the logged in state against my session in the Page_Load event, but that event never fires. How can I make that event fire on the nested master page? here is how my solution and pages are setup:

/MainMaster.Master (this Page_Load event fires)
/Default.aspx (MainMaster.master child) (this page load event fires)
./Admin/Admin.Master (MainMaster.Master child) (this page load event doesn't fire)
./Admin/Default.aspx (Admin.Master child) (this page load event fires)

Posted: Jun 25th, 2009, 03:33 PM

View 1 Replies!   View Related
Web Forms :: CheckedChanged Event Not Firing When Checked Property Set On Page_Load
I have a web form with two RadioButtons, both use the same GroupName, both have AutoPostback enabled and both have an event handler for CheckChanged. I use tem to show/hide a Panel further down the form which is contained in an UpdatePanel with Conditional Update set and with both CheckedChanged events in the Triggers collection:


Now, the problem arises when I set the Checked property of either RadioButton in Page_Load, which results in the even not firing for the button which was marked as Checked (the event for the radio button whose property was not assigned does get fired). In fact, upon inspecting the source there was no 'onclick' attribute declared for the input element that was marked as checked in the Page_Load, whereas the other RadioButton did have the 'onclick' attribute properly set.

The layout of the form doesn't allow me to place the radio buttons within the UpdatePanel, so that is out of the question. Is the behavior explained above normal? am I missing anything? Both events fire once the assignment to the Checked property is removed from Page_Load.

Posted: Jul 21, 2010 02:05 AM

View 13 Replies!   View Related
AJAX :: How To Partial Post Back Fires Page_Load Event
Basic concept of AJAX is to cause Partial post back of the Page.If we use AJAX, Page Load occurs, thanwhat is the difference between normal Pages' Page_Load event (without ajax) and Page load event of a Page with ajax.

Posted: Feb 04, 2010 04:21 AM

View 10 Replies!   View Related
Forms Data Controls :: ListView Ajax - Use A LinkButton Then The Page_Load Event Is Fired?
I have discovered something strange when using a ListView. I have a listview contained inside an uodate panel and everything works OK until I edit the editItemTemplate to use a LinkButton instead of a Button.When i use a LinkButton then the Page_Load event is fired.

Posted: Feb 03, 2011 07:20 AM

View 3 Replies!   View Related
Page_load Is Not Firing In IFrame?
In my web application,I use IFrames to show another page inside one page.But the problem is that the page load event of the embedded page in the IFrame is not firing when the Iframe is shown by clicking on a button in the parent page.I use the IFrame's visibility is true/false to show or hide the Iframe.I am confused what is happening there.

Posted: Mar 16 10 at 9:13

View 3 Replies!   View Related
C# - Page_Load Not Firing In UserControl?
I have created a class in c# inside a class library and i have added this control to the default.aspx, but my code doesnt fire the page_load event. Here is the code:

The page loads but doesn't show the label on the page. I have added the control to the page correctly without any errors. I have event added the register tag in there.

html tag: <RandoIntegerControls:RandomIntegerControl ID="RandomIntegerControl1" runat="server"></RandoIntegerControls:RandomIntegerControl>
using System;
using System.Collections.Generic;


Posted: Feb 22 at 21:00

View 3 Replies!   View Related
Page_load Firing To Frequnently?
I have a heavy aspx page with lots of controls that are loaded from sql server. I use the cache were I can.On my aspx page I have an asp:Button that allows members to rebuild the page with the new content selected in each control.The page build or page_load takes about 15 sec (say). If users select the asp:button before the 15 sec page_load is completed. Some times I get performance issues with my controls. I don't get errors as I am using cache a lot etc.

QUESTION1: How can I stop a page_load event firing before the previous page_load process is completed, how do I stop impatient users getting carried away with too frequent page loads firing from the asp:button?Can I do some codebehind smarts that can nullify asp:button event while a previous page_load is process is still a work in progress.

Posted: Feb 03, 2011 09:26 PM

View 5 Replies!   View Related
AJAX :: Event Not Firing In Firefox?
Unusual one this - IE7 and IE8both behaving, but Firefox isn't. So, I suspect that I have done something wrong which I am "getting away with" in IE.....I have a DynamicPopulateExtender (DPE) and two ModalPopupExtenders (MPE). A Javascript function shows the first MPE (a "please wait" message) and then retrieves the DPE. When the DPE finishes retrieving, its populated event fires - that hides the first MPE and shows the second one which holds the results retrieved by the DPE.I know that I could have used built in functionality within the DPE to display the "please wait" message. However that would mean displaying the MPE before populating the DPE. I can't do that because I want to size the MPE depending on what comes back from the DPE.So, this is my Javascript:


As I said, it works fine in IE7 and IE8. In Firefox (and Opera and Safari), the "please wait" appears and then nothing else happens.

Posted: Jun 04, 2010 12:39 PM

View 3 Replies!   View Related
AJAX :: Image_click Event Not Firing?
There are 3 update panels in my web page.

A gridview control is in the First updatepanel. Another user control is in the Second updatepanel.

Third update panel contains some textBoxes,a calendarImageControl(this is a userControl),Submit btn.

Now, when I click on Edit mode of gridview, those rspt. details are filled in the textBoxes of the 3rd updatePanle BUT when I click on the calendar image, the click event is not firing. the Submit button click event is getting fired(which is in the 3rd updatePanel).

Posted: Nov 06, 2009 05:34 AM

View 2 Replies!   View Related
Webforms - Page_Load Is Firing Twice In Page.. page_load function is loading twice.. hence it affects my page performance.

Does anyone know the reason it is loading twice.

No, iam not calling the page load function anywhere...

Posted: Jan 24 at 18:46

View 2 Replies!   View Related
AJAX :: Event Not Firing On Tab Container Control
i'm using ajax tab container control and i have 4 tabs on it. and each tabs contains a datalist. and whenever someone clicks on the datalist he has to redirected on abc.aspx for that i 'm using itemcommand event but facing problem whenever i click on datalist the event is not fired.

Posted: Mar 05, 2011 08:57 AM

View 2 Replies!   View Related
AJAX :: Dropdown SelectedIndexChanged Event Is Not Firing
I have a usercontrol and in that i have a dropdown. i need async postback for dropdown selectedindexchanged event. i set the AutoPostBack=true for dropdown. Eventhough the event is not getting fired.

Posted: Sep 13, 2010 01:53 PM

View 3 Replies!   View Related
AJAX :: ModularPopUpExtender- Button Event Not Firing?
<asp:Button ID="btnUpdate" runat="server" Text="Update" CausesValidation="false"

Posted: Jun 12, 2010 04:05 AM

View 5 Replies!   View Related
AJAX :: TabPanel With Placeholder Event Not Firing?
I have a tabcontainer with a number of tabPanels. Each tabPanel has a placeholder tag which is set dynamically with relevant user control classes(ascx). When a button is clicked from a ascx within a placeholder, the onclick event does not get executed. How can I get this to work??

<cc1:TabContainer runat="server" ID="MainContainer" CssClass="MainContainer"
Width="100%" ScrollBars="Auto" AutoPostBack="True"
<cc1:TabPanel runat="server" HeaderText="Home" ID="TabPanel1" CssClass="AcademyTab" Width="100%">
<asp:PlaceHolder ID="HomePlaceHolder" runat="server" ></asp:PlaceHolder>
<cc1:TabPanel runat="server" HeaderText="Students" ID="StudentPanel" CssClass="AcademyTab" Width="100%">
<asp:PlaceHolder ID="StudentPlaceHolder" runat="server" ></asp:PlaceHolder>
<asp:Button runat="server" ID="BtnSearch" Text="search" />

Posted: Jun 14, 2010 11:00 AM

View 1 Replies!   View Related
Web Forms :: Page_load Not Firing - Finding Solution
Ihave to convert a c# web app to vb..... I am having trouble with the page load event firing. Here is the code.


Posted: Dec 06, 2009 05:58 PM

View 5 Replies!   View Related
Page_Load Not Firing On Second Call To Response.redirect
I have the situation where when I call Response.Redirect("MyPage.aspx") the Page_Load function is only fired the first time I call Response.Redirect to "MyPage.aspx".

Why is this happening?

How can I force a page to completely load again when calling Response.Redirect("MyPage.aspx") when I'm on another web page?

Posted: Mar 19, 2009 05:37 AM

View 5 Replies!   View Related
C# - Why Is Page_Load Not Firing After Coming Back From Another Page
Let's say I have two pages on the same ASP.NET C# WebSite:

Page1.aspx does things in the Page_Load event
I navigate to Page2.aspx using the menu
Page2.aspx does some things then Response.Redirect back to Page1.aspx
Page1.aspx cannot do things in Page_Load event this time because it never fires.

I tried to turn off cache declaratively, tried using true for endResponse in my redirect... nothing seems to make a difference.

Posted: Feb 17 10 at 14:12

View 5 Replies!   View Related
Web Forms :: Page_Load Not Firing After Response.Redirect()?
I am developing a data heavy application, in which there are a number of web pages which display data read from an SQL database. The data is displayed using a combination of ReportViewer, DataGrid and FormView controls. It is a fairly interactive application, and I am making use of ASP.NET AJAX to help things along. At any point in time, a page is displaying data for one entity (for the sake of example, lets say that the entity is an employee, and the page displays employee HR details). The user can navigate between employees using a number of different controls, including a dropdown list, and a search box. I also want to enable the user to search for an employee by supplying a query string in the URL. To minimise confusion, and ensure consistency, I do not want the URL to display query strings, as it is possible that the user may navigate to another employee, using page controls / AJAX, in which case, the URL would get out of sync with the page if the query string stayed visible.

In the final solution, I am using a combination of query string, Session variables, and Response.Redirect during Page_Load. Essentially, if a user supplies a query string, the Page_Load method detects it, sets a Session variable, and redirects to the same page, but without the query string. Following redirection, the Page_Load method detects that there is no longer a query string, and instead looks at the Session variable. If it is present, it initiates the search and populates the web page as appropriate.

The behaviour is inconsistent. Usually, if the query string is supplied via a hyperlink on a web page, it works fine. However, if the user types the query string into the address bar, it doesn't work. Looking further into it, I have found that when it doesn't work, it is because Page_Load does not get fired following the Response.Redirect.

Here is a heavily simplified example, which reproduces the problem for me:


Page Language="C#"


When either of the hyperlinks on the page is clicked, the label will be correctly set to the value of the query string. However, if the query string is typed into the address bar it is not.

More frustratingly, I find that this behaviour only occurs in either IE6 or IE7. Everything works perfectly in Firefox. Also, if I use cookieless session state, (cookieless="false" in web.config, mode="stateServer"), the code works fine in IE - but this is also not what I want, since the URL now has session information encoded in it, which is confusing to the user.

So it appears to me that the whole problem boils down to IE's handling of cookies - I've no idea what to do about this. As far as I can tell, all the IE browsers I have tried this on are at "factory standard" settings - which they have to be for my broad user group.

A few other comments relating to ideas I've seen elsewhere: I'm not using a web garden (max number of worker processes = 1). There are no underscore charactersin the site name / URL.

Posted: Sep 28, 2007 01:33 AM

View 3 Replies!   View Related
Web Forms :: Firing A Button Click After Page_Load?
I am designing a page wherein I want to display just parts of a page on page_load (i.e. menu bar). Then a few seconds later, I would like to display the rest of the controls (i.e. charts). Is this possible? What I currently have is a page that displays the page skeleton and then on button_click(), the rest of the page is rendered. Iwant to firea button_click() eventon code-behind without actually requiring the user to click on the button but can't seem to find good tutorials/articles regarding this approach.

Posted: Mar 24, 2011 04:34 AM

View 5 Replies!   View Related
AJAX :: Accordion With LinkButton OnClick Event Not Firing?
I have two problems with a databound AJAX Accordion. The Accordion looks like this:


The code behind has this subroutine:



The first problem I'm having is that this subroutine is not fired (I have a breakpoint in it) when the LinkButton inside the accordion is clicked. The Page_Load event fires and there is no error message, javascript errors, etc, but nothing else happens.

The second problem is that I'm not sure how to go backwards with the databind. I want to be able to make use of the UpdateMethod in the ObjectDataSource because I also have textboxes inside the accordion. I will have a Save subroutine that can be called but I'm not sure what code to put inside it.

Posted: Apr 06, 2010 03:06 PM

View 1 Replies!   View Related
AJAX :: Button Click Event Handler Firing Twice?
I noticed today that button click event handlers are firing twice for me in some cases when the button is inside an UpdatePanel -- but only in Firefox. I'm wondering if this might have to do with the Firefox update that came out today because I never noticed this problem until today.

Posted: Dec 20, 2006 09:03 PM

View 12 Replies!   View Related
AJAX :: UpdatePanel Not Firing Button Click Event?
I have a master page containing a ScriptManager control, and a Content Page containing a ScriptManagerProxy Control. Further on the content page I have an UpdatePanel control containing a GridView control and a server side button control. I have registered the button control as a trigger with the UpdatePanel control asynchronously and have set the UpdateMode of the UpdatePanel to "Conditional". I also have a "JumpLoader" control which is outside the UpdatePanel control. I have the following event for Jumploader wired up through Javascript. I am pasting the relevant sections of the code below:


Posted: May 10, 2010 09:01 AM

View 10 Replies!   View Related
AJAX :: All Controls Firing An Event On First Page Postback
I have a web application that shows a page containing between 6 and 20 UpdatePanels, contained with Custom Web (.ascx) Controls.

You can see an example of such a page here: [URL]

The problem I'm getting is that when the user FIRST clicks any of the radio-buttons on any of the controls in the page, ALL the radio buttons that have an active selection ALSO fire an rb_CheckChanged event (see application log below). On subsequent radio-button clicks, only that RB fires the event (as expected).

This behaviour is having a dramatic impact on performance. The page loads quickly, and a "normal" RB click provides an AJAX update correctly within 1 second. The problematic first RB click, however, takes up to SIX seconds to process, which is unacceptable from a user experience standpoint.

Developed in VS.NET 2008, ASP.NET 3.5. Also I converted the "Web Site" solution to a "Web Application" (pre-compiled) and got the same performance (still too slow). Release builds run only marginally faster than debug builds.

Why would a single RB selection change cause all RB's that have a "selection" set on them to also fire? (The "selection" is determined through database settings every time the control is populated, which is called from within the parent page control's Page_Load function. This selection is determined also at first page load, since all the controls get populated then, so why would the clicking of an RB cause them all to fire an event, and only once? That's what I don't get...)


Posted: Feb 08, 2010 08:32 PM

View 3 Replies!   View Related
AJAX :: Event Handler Not Firing Using Master Page
I have the following Master Page


Which is used in the following Page


With the following code behind


The trouble is while the event handler for the btnSearch fires, the same can not be said for the btnSave handler.

Anyone see what obvious thing I have missed.

Posted: Jul 30, 2010 10:18 AM

View 1 Replies!   View Related
AJAX :: Accordian Control Is Not Firing The ItemDataBound Event?
I'm trying to get this accordian to get my data to display with a gridview in it, it renders fine, my datatable is being filled and it seem to bind but then there it no data and it skips my itemdatabound event in my code behind... Nothing loads!

if there is a bug with the databound event in or for this ajax control?



Posted: Apr 21, 2010 02:35 PM

View 3 Replies!   View Related
With IIS7 And Ajax Button Event Not Firing Anymore?
I have a form with some minimul ajax in it. ScritpManager, UpdatePanel and FilterTextBoxExtender. When I comment all my ajax code out the button click event fires, data is submitted to the database, basically it works. When I want to test it with the ajax code the button click event does not fire anymore. This all worked in IIS6 but no that we are migrating the app to IIS7 itisn't working anymore. Here is the code for the button:

onclientclick="this.disabled = Page_ClientValidate();if(this.disabled){this.value = 'Your request is being processed....

Posted: Mar 26, 2009 10:58 PM

View 2 Replies!   View Related
AJAX :: Button Click Event Is Not Firing If Use Updatepanel?
I am opening a popup from aspx.cs page when a button ckicks, but at that time the source page is getting refresh.

To avoid that i want to use updatepanel, but if I use that button click event is not firing.

the code of .aspx page is

<asp:UpdatePanel ID="pnlButtons" runat="server">
<asp:AsyncPostBackTrigger ControlID="btnPreview" />


Posted: Feb 16, 2011 11:13 AM

View 3 Replies!   View Related
AJAX :: ModalPopupExtender Preventing Codebehind Event From Firing?
Here is what I'm trying to do: Click a button on my page, which in turn makes (2) things happen:Display a ModalPopup to prevent the user from pressing any buttons or changing valuesCall my code behind method, hiding the ModalPopup when finished Here is the ASP markup:


popup is ALWAYS equal to null.

Posted: May 21, 2010 04:13 PM

View 10 Replies!   View Related
AJAX :: Control Toolkit Contentchanged Event Not Firing?
The AJAX Control Toolkit HTML Editor control contentchanged event is not firing. I have an htmleditor control and a button to save the contents of the editor to a file. What I am trying to do is detect when the content has changed and change the color of the save button so the client knows when it needs to be saved. My experience in javascript is unfortunately rather limited. I think this would make a great control extender for thehtmleditor control.

Posted: Nov 04, 2009 01:25 PM

View 1 Replies!   View Related
AJAX :: How To Stop The SelectedIndexChanged Event For Listbox1 In UpdatePanel1 From Firing

I have 3 update panels on a page, each of them have UpdateMode="Conditional".

UpdatePanel1containslistbox1 (AutoPostBack set to true)which is populated on pageinit from the DB.

UpdatePanel2containslistbox2 (AutoPostBack set to true), this panel has AsyncPostBackTrigger set to the SelectedIndexChanged event for listbox1 in UpdatePanel1.

UpdatePanel3 contains textboxes that will hold the details once an item has been selected from listbox1 and listbox2, this panel has an AsyncPostBackTrigger set to the SelectedIndexChanged event forlistbox2 in UpdatePanel2.

In the codebehind,the SelectedIndexChanged event forlistbox1populateslistbox2 andthe SelectedIndexChanged event forlistbox2populates the textboxes in UpdatePanel3.

The problem

When the page loadslistbox1 is correctly populated, I select a value from listbox1 and listbox2 is populated, great, no problem so far. When I then select a value from listbox2 the SelectedIndexChanged event for listbox1 is firing, I assume that as this populates listbox2 again it is clearing the selected value for listbox2 as the SelectedIndexChanged event for listbox2 is not firing.

How do I stop the SelectedIndexChanged event for listbox1 in UpdatePanel1 from firing when I select a value from listbox2 in UpdatePanel2 ?

Posted: Jun 15, 2010 02:39 PM

View 5 Replies!   View Related
AJAX :: Button.Click Event Not Firing Inside UpdatePanel?
I've got some controls in an Update Panel (which is contained within the TargetControl of a AJAX ModalPopupExtender), namely a couple of buttons. When I click on the buttons, they don't fire the .Click event and I'm pretty sure they're not even posting back, even after I've set ChildrenAsTriggers="true"

Here's what I've got.



Posted: Dec 09, 2009 08:57 AM

View 2 Replies!   View Related
AJAX :: Onchange Event For Textbox Not Firing Inside Updatepanel?
i am developing the webpage using Visual 2008.In that i have i am using update panel and displaying values in the textbox bby using webservices from sql database.I need this thing if textbox values changes i need to change the backkground color of the text box also, so that user can easily identify which textbox values are changing. like this i have 5 more text boxes control in the same form .i have tried but i could not able to get done. i have written javascript code on change event of the text box it does work.


Posted: Oct 24, 2010 11:19 AM

View 2 Replies!   View Related
AJAX :: CheckBox Inside Updatepanel CheckedChanged Event Not Firing?
I have a checkbox, textbox and requiredfieldvalidator inside the updatepanel. Once user checks selects
checkbox I am enabling requiredfieldvalidator.

I have one more textbox, requiredfieldvalidator, validationgroup and Linkbutton outside updatepanel.

Strange thing is Checkbox checked event not firing in some cases,

1. Check the checkbox (which enables requiredfieldvalidator)
2. Click the Linkbutton (fires two validators)
3. Uncheck the checkbox (which should disable requiredfieldvalidator)
4. Click the linkbutton again (again it fires two validator, which should fire only one validator)

Note: The problem only arising when I add javascript block to linkbutton in page load event.


Posted: Mar 11, 2011 03:37 AM

View 3 Replies!   View Related
AJAX :: Change Event Not Firing After Callout Message In A Popup?
I have a popup which displays two drop down lists, name it : ddl1 and ddl2 and for both of these i have mandatory validation, so if any of these is not provided, callout message will come on submit click.

ddl2 will get populated once any value from ddl1 is selected(selected change event).

Now problem is, suppose without entering any value, i click submit, it is showing select value for ddl1, and when i select a value, the selected change event for ddl1 is not firing, and so ddl2 is not getting loaded.

Selected change event for ddl1 is firing in normal condition, if the callout messageis not there.

but after thecallout message, if i try to select a value, the event is not firing.

Posted: Mar 01, 2011 05:57 AM

View 7 Replies!   View Related
AJAX :: Button Event Inside User Control Is Not Firing?
i have a page with user control which is placed inside a updatepanel. In the user control, i have a server button control. When i click the button control, button control event is not fired in the first time. if i click the button again, it fires the event.

Posted: Feb 21, 2007 11:38 AM

View 9 Replies!   View Related
AJAX :: Button Onclick Event Not Firing When Controls Are Introduced?
I have a web page which has both controls as well as AJAX controls.I am facing a weird issue when I introduce some AJAX controls(Modal popup) inside a tabbed panel, the button onClick event stops firing.

Posted: Dec 03, 2010 09:54 PM

View 6 Replies!   View Related
AsyncPostBack Firing On Child Textbox Trigger, But TextChanged Event Not Firing?
I'm sure I'm missing something extremely obvious here, but at this point I can't see it so I need the help.Anyway, I've got a repeater inside of an UpdatePanel. As of right now, I've stripped it down to this, just to try and isolate the problem:


Whether I add the handler during itemdatabound or I add the handler within the repeater itself, it doesn't seem to matter...the event itself doesn't fire. The AutoPostback itself seems to fire, but the event itself doesn't.

Posted: Jan 22, 2010 11:53 PM

View 3 Replies!   View Related
Web Forms :: Web User Control Event Not Firing / Dropdownlist That Isn't Firing
I have a web user control that I put into4 template pages. It contains a dropdownlist that isn't firing.

Here is the code:


And here is the html:


Posted: Dec 21, 2009 05:12 PM

View 5 Replies!   View Related
Copyright 2005-08, All rights reserved