page-lifecycle

ASP.NET UserControl not being updated after event

I have a asp.net control that represents a table and a control that represents a row in the table. Each row contains a text field for a date and a button to submit the date entered. <asp:TextBox ID="TextBox" runat="server"/> <asp:ImageButton ID="SubmitButton" onclick="SubmitButton_Click" runat="server" /> The button fires an event ...

Update Panel and Drop Down List databinding twice - lifecycle

I think this is an asp.net page life cycle question, but none the less, i can't quite figure it out. I have a drop down list in an update panel that lists users and then shows details below it (update or delete). When the I click delete, the code behind goes and clears the ddl (to remove the deleted user), and then rebinds it. All fin...

Jquery Cycle with thumb pager issue

Hi, I'm trying to create a slideshow with the jquery cycle plugin. I'm trying to have it so that thumbs for the slide show are auto generated from the main images. I am also trying to have the ability to show both images that link out to other sections, and some that do not. So far, the thumbs break when I add a link to a main image. he...

Databinding problems with postback

Hey, I've two issues currently preventing me from finishing two projects properly. I'll put them both here as I believe they're connected to the asp.net page lifecycle, but I can't find a way around them. First I have a DropDownList which I must sort in codebehind. It only contains text, so I should be able to do that with the followin...

hidden field is null on !IsPostBack and not null on IsPostBack

First I'll apologize for the unclear title of my question. I wasn't sure how to succinctly describe my problem in a title. I have a hidden field in my .aspx <input type="hidden" name="hid1" value="0" /> I want to set the value of this field during the page load event, and if it is not a postback. protected void Page_Load(object sen...

Web Methods works with html button but not asp:button

I'm am looking at the code in this article on Web methods and I've tried to implement it. The article works as designed but when I swap the HTML button for an asp:button I get different results. CODE behind: [WebMethod] public static string GetCurrentDate() { return DateTime.Now.ToString(); } Aspx pa...

ASP.Net (Web-forms) Page Lifecycle Problem - distinguishing between form loading, datapaging and command events.

I'm working on a sortable listview with data-paging. I've got the listview and paging working fine, but I'm struggling with with the sorting. The sorting in itself is fine; I can sort by a particular column (ASC or DESC), however I'm having problems when it comes to dynamic sorting where the user can pick a column and, at times, reverse ...

Button click event called again when page is refreshed using F5

Hi friends, I found that if you press F5 or refresh from browser window, the last event fires again. For ex. I have clicked on a button the button event is carried out normally, but if i press F5 from browser window then the same event is fired again. Could someone have any idea? Thanks for sharing your valuable time. ...

How can I manage a asp.net page in different states using an enum

All I am having with what appears to be a ASP.NET page life cycle issue. I currently have a user control embedded into my page. Now depending on the options chosen from the menu item list, the page can be in one of three states represented by a PageStates Enum within the control. The page on selecting the menu item merely updates the ...

Is it possible to prevent a request from going to the page?

This might be really hacky, but I'm beginning to get desperate Is it possible to prevent a request from actually hitting the actual page...ie, can I write something in Application_BeginRequest that processes the part that I want, and then skips the rest of the lifecycle? Oh, and is it possible to do it in such a way that the ajax updat...

Asp.net pagelifecycle page_loadComplete

In my web application I load user controls in the page_loadComplete event. This works fine, however when a button is clicked in a user control, the click event is never fired. Does this has something to do with the page lifecycle? That button click (UI) events occur before the LoadComplete event? ...

What if you want webpart communication before Page_Load?

Hi, I am needing to create some dynamic controls at Page_Load in the consumer webpart. In the Provider webpart I did some hacking and got it so I could get a controls value before viewstate is loaded in Page_Init. So basically what I want is for webparts to be able to communicate before Page_Load. [ConnectionConsumer("FormRID Consume...

How to figure out if other controls are constructed before OnInit

Hi, I'm making a custom control. Basically what I'm looking for is a OnPreInit event in custom controls. I basically need to know that all of the controls that will be loaded of type MyCustomControl are constructed or not. Ok, so basically I need to know in the constructor if the current instance being constructed will be the last. ...

Add dynamic controls in ASP.NET, is there a difference between 1.1 and 2.0?

I am pretty sure back in the days of ASP.NET 1.0/1.1, controls created during runtime needs to be added before Page_Load event of the Page Lifecycle (i.e. inside Page_Init). Here's one article by Microsoft on it (for .NET 1.0/1.1): HOW TO: Dynamically Create Controls in ASP.NET: Note When you create dynamic controls on a Web Form,...

How can I execute something between instantiation of the user control and OnInit call?

What is the simplest solution here? ...

The page lifecycle for controls(order contructed from a page)

Ok, I have not been able to really find an answer to this on the internet.. Maybe someone here can help me. For example, lets say I have a page and 2 custom controls on that page. During what event on page do these controls get constructed. When does their page_init get called? Also, for these 2 custom controls, do they both get const...

Changes to ASP.NET page lifecycle

Have there been any changes to the page lifecycle of an ASP.NET web page in 2.0 vs 3.0 vs 4.0 frameworks? ...

ASP.NET Lifecycle and long process

Hello, I know we need a better solution but we need to get this done this way for right now. We have a long import process that's fired when you click start import button on a aspx web page. It takes a long time..sometimes several hours. I changed the timeout and that's fine but I keep getting a connection server reset error after about...

ASP.NET Inherited UserControl, Events Sequence Question

I have a UserControl inheriting from another, and my question is simple. Does the control's page load fire first, or does the base class page load fire first? ...

Detect when all ASP.NET-generated Javascript has run

I currently have a page that contains a RadTreeView. On each node of the RadTreeView is an ASP.NET Ajax CollapsiblePanelExtender. In the code-behind I have certain panels expanded and certain panels collapsed based on some business logic. Is there a way to detect when ALL ASP.NET-generated Javascript (collapsing/expanding of Collapsib...