page-lifecycle

Button on click method entered on page refresh!

Hi, I have a .net 2.0 application and I can't work out why a button's onclick method is run on page refresh. The exact scenario when this happens is a checkbox is ticked against each item the button is clicked and the onclick mthod processes this item, and the checkbox is cleared. Now when the page is refreshed for some reason the oncl...

SSRS 2005 Report Functions

In SSRS 2005 (and 2008 I would imagine) you can provide functions to the reports, and if I'm not mistaken, whole assemblies as well, which allow you to perform some type of work before the report is rendered. Does anyone know at what point in the ASP.NET page life-cycle is this function compiled and / or executed? I would tend to thin...

Button_Click Event not raised due to CompareValidator

I have a page containing an <asp:Button/> to leave the page and a <asp:TextBox/> to get some date and another <asp:TextBox/> to confirm that data. The confirm validator is configured as follows: <asp:CompareValidator ID="CompareValidator" runat="server" ErrorMessage="error message" ControlToValidate="ConfirmTextBox" ControlToCompare="Te...

registerClientScriptBlock in custom handler?

I'm using a custom control in ASP.NET that handles file uploading for me. The control has a handler in the code-behind using something like this: Protected Sub UploadFileComplete(ByVal sender As Object, ByVal e As UploadControl.FileUploadCompleteEventArgs) Handles UploadControl.FileUploadComplete Within that sub, I post back to the se...

ASP.NET winforms-like philosophy and page lifecycle often get in my way

MVC + classic webforms in the same website Now I am wondering if it was possible to mix MVC and classic webforms (I don't want to reimplement what I've already done even if this makes the code non-homogeneous...) Original question The more I improve my understanding of ASP.NET (and web programming in general) the more I dislike ASP.N...

How to Load IFrame after PageLoad

I have one page .aspx, and in page , I have put an iframe on header page. Is it possible that iframe loads after page load finishes? ...

Loading Nested UserControls in ASP.NET

I've got an issue with nested controls not loading properly. I've tried various page methods and nothing seems to work. EDIT: The site compiles and runs fine--it just leaves a blank screen though. Basically I have a wrapper control for a Chart that allows me to select data, bind, and customize the chart with a lot of abstraction. I n...

Is there a Performance Difference in having Code in the ASPX file?

Putting code at aspx files is slower? The code is recompiled every access? At my mind, code at aspx file is compiled at first access together their dll(maybe in Page_Init) and moved to Temp Asp.Net folder. And .aspx file just is necessary for IIS found a file. ...

Can I control cleaning items when user leaves the request?

Hi all. I have a page that allows uploading of multiple files, the files are uploaded constantly, i.e. there are many FileUpload controls and a submit button near each of them and it uploads immediately. I want, that once the user leaves the page and goes to another page without saving the main container (e.g. the 'item' = a product/no...

keep flash music player across page refresh/change

Hi all! I am trying to have a flash-based music player on my page which continues playing a song even when you refresh or go to another page within the web site. I whant do this like facebook footer i read this topic http://stackoverflow.com/questions/668431/how-does-facebook-keep-the-header-and-footer-fixed-while-loading-a-differe...

Where should stuff be done in an ASP.NET page?

I'm very new to ASP.NET and, after beating my head on a few problems, I'm wondering if I'm doing things wrong (I've got a bad habit of doing that). I'm interested in learning about how ASP.NET operates. My question is: Where can I find documentation to guide me in deciding where to do what processing? As a few specific examples (I'm in...

create pageContext from HttpServletRequest

I know this might sound crazy...but i am integrating with some third party api's and unfortunately they have a utility class which only takes a pageContext object..I did some peeking around and found that they are doing a lot of stuff with pageContext... Is there a way to get to or create a pageContext from HttpServeletRequest. ...

ASP.NET Triggering server-side events with multiple arguments

Hi, I've got a rather lengthy question I'm afraid. I'm fairly new to ASP.NET so please bear with me. I have built a control for an ASP.NET page that lists a number of options. Each option has two clickable areas (call them buttons for the sake of simplicity). One to select the option and one to hide the option. protected void Page_Loa...

ASP.NET: What happens to code after Response.Redirect(...)?

Does Response.Redirect() cause the currently running method to abort? Or does code after Response.Redirect() execute also? (That is, is it necessary to return/Exit Sub after a Response.Redirect?) ...

What is processed first: aspx or aspx.vb code?

I wonder what is processed first: if the code placed in the aspx part (using server tags <% %>) or the code behind, because I place a variable that is filled in the Page_Load in the aspx between server tags and I'm not getting anything when there is a value. Anyone can point me in some directions like an article talking about the page l...

What is the practical difference between Response.Write and <%= %>?

I've run into an issue where a third-party component appears to be interfering with Response.Write and causing any content within Response.Write("") to render before any of the other html. For example: <html><head><title><% Response.Write("HELLO WORLD") %> will render as HELLO WORLD<html><head>... However, any content rendered usin...

ASP.NET BasePage back referencing to concrete implementation

I have a page that is setup like this public partial class _Default : ViewBasePage<EmployeePresenter, IEmployeeView>, IEmployeeView { ... } Inside my base page public abstract class ViewBasePage<TPresenter, TView> : Page where TPresenter : Presenter<TView> where TView : IView { protected...

Asp.Net - page refresh(F5) do not restore the initial value of TextBox

this is the simple code: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { txt.Text = "Original"; } } first load. text box state is "Original". manually , changing the value to "Not Original". pressing F5. the line: txt.Text = "Original"; is executed but the Input value remain "Not Origi...

Accessing ClientID breaks the postback...

Sometimes I do despair when working with ASP.Net - another problem that shouldn't be! On the web form there is an ASP table. In the ASP table there is a user control which I am making some changes to. In the ASP table there is a text box....nothing out of the ordinary so far! In the code behind, as part of the Page_Load, I need to ac...

Custom server control, with form and scriptmanager

I am building a set of asp.net server controls and in one of them, essentially a container control, I want to add a form control, a script manager and an update panel. Is this possible or will I have to create these in a Page base class that I have for the web project for page/control life cycle reasons? I am not using master pages. Re...