Skip to content

Commit

Permalink
move ProcessRequest() to OnInit()
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailTymchukDX committed May 30, 2016
1 parent 55dd560 commit 7602f94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions AjaxControlToolkit/AjaxFileUpload/AjaxFileUpload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,22 +231,22 @@ public bool ServerPollingSupport {

protected override void OnInit(EventArgs e) {
base.OnInit(e);

if(!IsDesignMode) {
if(!string.IsNullOrEmpty(Page.Request.QueryString["contextkey"])
&&
Page.Request.QueryString["contextkey"] == ContextKey
&&
Page.Request.QueryString["controlID"] == ClientID)
IsInFileUploadPostBack = true;

ProcessRequest();
}
}

protected override void OnLoad(EventArgs e) {
base.OnLoad(e);

if(ProcessRequest())
return;


// Register an empty OnSubmit statement so the ASP.NET WebForm_OnSubmit method will be automatically
// created and our behavior will be able to disable input file controls prior to submission
ScriptManager.RegisterOnSubmitStatement(this, typeof(AjaxFileUpload), "AjaxFileUploadOnSubmit", "null;");
Expand Down

0 comments on commit 7602f94

Please sign in to comment.