What is the life cycle of loading an ASP.NET file to code?

I would like to know what events will be executed (if any) after the user has chosen to send the file for upload on the ASP.NET page.

Do I need to configure anything at the IIS level?

Should page life cycle events fire when a user uploads a file?

I see a different behavior on my development server from Visual Studio regarding the IIS server I am deploying to:

on the development server, life cycle events fire when a file is selected on a deployed server they don’t ..

What classes do I need to override, what parameters web.configshould I change in order to configure the default boot behavior?

The problem I ran into is finding documentation on how to execute the code before downloading the file, but after selecting the file.

PS this is due to the previous question of mine here , but it came up very differently in the hope of understanding the whole boot process, so I thought it was another question together.

+3
source share
2 answers

No, it does not have an event to download a file (possibly on .net 4)

what I did was a class that comes from the load object and the OnLoad event, something like this:

public event EventHandler OnUpload;
protected void OnLoad(...){
   if (this.HasFile && this.OnUpload != null)
     this.OnUpload(this, EventArgs.Empty);
}

something like that.

Joe

- : , , , , ? javascript. , , . WebService, onchanged , , . javascript ?

:

  <asp:textbox id="t1" runat="server"/>

:

  t1.Attributes.Add("onchange", "alert('it changed its value: ' + this.value);");

, .

+2

, JavaSript. . :

, ?

+1

Source: https://habr.com/ru/post/1720524/


All Articles