This is a migrated thread and some comments may be shown as answers.

Can I read ajaxRequest arguments in master page OnInit

1 Answer 43 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Thad
Top achievements
Rank 2
Thad asked on 08 Nov 2012, 02:25 PM
Hello,

I am firing an ajaxRequest and need to capture the arguments from within the OnInit of my master page.  This is because the page lifecycle fires the AjaxRequestHandler after the page has already loaded and I need to set global values prior to any page load.  I'm trying to avoid having to reload the pages by invoking a delegate.

Is it possible to read the arguments in server code anywhere but in the event handler?

Request.Form["__EVENTTARGET"] is "ctl00_rsmMain" and I can't find the property in the ScriptManager object.

Thanks!!
Thad

1 Answer, 1 is accepted

Sort by
0
Thad
Top achievements
Rank 2
answered on 12 Nov 2012, 02:07 PM
Figured this out.  The answer was staring me in the face I just didn't see the forest for the trees...

string postbackArgument = Request.Form["__EVENTARGUMENT"];

Sorry for wasting everyone's time!
Thad
Tags
Ajax
Asked by
Thad
Top achievements
Rank 2
Answers by
Thad
Top achievements
Rank 2
Share this question
or