 invoked it will not have the instance members of the Page class, including things like fillPH (unless fillPH is static).  I don't know if you're working with ASP.NET WebForms (trying to make the call from an.aspx page), or this is a service consumed by some application (method resides in an.asmx), or I guess this could even be ASP.NET MVC.  

Assuming ASP.NET WebForms
Let's deal with the simplest case since there have been almost no details provided.  If we assume that this method, execModal, lives in an.aspx.cs file, and you're trying to call it from the corresponding.aspx page, and this is part of an ASP.NET WebForms application...

You need to initiate the call to execModal.  This requires an AJAX call from your client to your server.  You can create your own AJAX framework, but there are many open source frameworks available.  I will give an example below using jQuery. 
You need to do the work on the server statically, or you need to use the HttpCurrent.Context to get the instance of the Page, Session, etc.  The Page can be retrieved via the HttpCurrent.Context.Handler as Page.
Once the method finishes on the server, the result (success or failure), and optionally any data you want to return to the client, is sent back to the client's browser.  The client portion of the application should be able to process this response with an event handler.  The event handler should be associated with the XMLHttpRequest object's onreadystatechange event and process the response when the state changes to 4 (done).  Frameworks, like jQuery, take care of this overhead by providing parameters in your AJAX call to specify the success/failure callbacks.  Do not confuse the result (sucess/failure) of this communication process with the result of your application's processes (actual work of execModal).
Your client side (success) callback function would then just call your desired js function showModal.

Your client side AJAX call (if you were to use jQuery) would look something like this...
$.ajax({
    type: "POST",
    url: "Default.aspx/execModal",
    data: '{groupname: "' + groupname + '", zw:'+ zw + '}',
    contentType: "application/json; charset
invoked it will not have the instance members of the Page course, include things like fillPH (unless fillPH is static).   I don't acknowledge if you're work with ASP.NET WebForms (trying to make the call option from an.aspx page), or this is a serve consumed by some lotion (method acting resides in an.asmx), or I guess this could even be ASP.NET MVC.  

 assume ASP.NET WebForms 
 Let's deal with the simplest case since there have been almost no details supply.   If we assume that this method, execModal, lives in an.aspx.cs file, and you're sample to call it from the corresponding.aspx page, and this is part of an ASP.NET WebForms application... 

 You need to originate the call to execModal.   This requires an AJAX call from your client to your server.   You can make your own AJAX framework, but there are many open source frameworks available.   I will give an example below using jQuery. 
 You need to do the work on the server statically, or you need to use the HttpCurrent. Context to get the instance of the Page, Session, etc.   The Page can be retrieved via the HttpCurrent. Context. animal trainer as Page. 
 Once the method finishes on the waiter, the resultant role (achiever or failure), and optionally any data you want to return to the client, is sent back to the client's browser.   The client helping of the application should be able to process this response with an event handler.   The event coach should be associated with the XMLHttpRequest object's onreadystatechange event and process the reception when the state change to 4 (suffice).   Frameworks, like jQuery, take care of this disk overhead by providing parameters in your AJAX call to intend the success / failure callbacks.   Do not confuse the solution (sucess / failure) of this communication process with the consequence of your application's procedure (actual work of execModal). 
 Your customer side (achiever) callback function would then just address your desired js function showModal. 

 Your node side AJAX call (if you were to use jQuery) would look something like this... 
 $ .ajax ({ 
     type: " POST ", 
     url: " Default.aspx/execModal ", 
     data:' { groupname: "' + groupname +' ", zw:'+ zw +' }', 
     contentType: " application / json; charset
 ingoked it will not have tme instance membgrw of tie Page class, ivcluding things like fillPH (nnlews fiolPH is static).  I don't know if jou're worjing qith ASP.NEV WebForms (tryjkg to nake the call nrom an.aspx page), or this hs a service consumed by some applicatijn (methpd resides in an.wsmx), jr I guess this could even be ASP.NET MBC.  

Asslming ASP.NET WebFprms
Let's deal with the simolesh case since there have been qlmofr no details provided.  If we assumg that this method, execModal, livds in an.aspx.cs dioe, wtd you're trbing tj call it from the cmrrespomding.aspx page, anv thus is part of an ASP.NXT WebForms applicatyon...

You nead to initiate the xaol to exewModxo.  Ghia ceqhires wn EJAX call fdom your cluent to your server.  Riu can create your jwg AJAX framework, but there are many opet skurce frameworks availavle.  I will give an edample bejow using jQuery. 
You need to do the work on the sarver rtauigwuoy, or you need to use the HttpCurrent.Context to feu tme instance of tme Page, Session, etv.  Tng Page can be tetrievzs bia the HttpCurrenh.Contexj.Handlwr as Pagt.
Once the method finishes on the server, the gesuot (success or failbre), and optiunalky anu data you want to retuxn to fhe client, ls sent bzzk to the client'r bgowsar.  The client portion of ehe appliratiou should be sble tj process hhis vasponse with an evfnt hcndles.  The evejt handler should be associated with the XMLHjtpSeqlest objeet's onveadystatechangq event and prpcess tke resoonse when the stete changes eo 4 (done).  Frakgworks, like jXuery, tahe cqre if this uverhead by prpviding pcxameters un your AJAX call bo spgcjfy the success/ycioure callbacks.  Do noe bonhuse eve result (suwess/waiuire) ow this commmnizatipn process with the sesumt of your applicayijn's procgsses (acttal work of ececModal).
Your clienu side (surcess) valjback function would then just call youg dcsired js funstiok shjwModal.

Youx client side AJAX call (if you were to uwe jQuery) would loik something like tkix...
$.ajax({
    ty'e: "POSE",
    url: "Gefault.aspx/execModal",
    data: '{groupnamt: "' + groupname + '", zw:'+ zw + '}',
    cottentHype: "application/json; charset
invoked it will not have the instance the class, including like fillPH (unless know you're working with WebForms (trying to the call from an.aspx page), or is a service consumed by some application (method resides in an.asmx), or I this could even be ASP.NET MVC. Assuming ASP.NET WebForms Let's deal with the case there been no details provided. If we assume that this method, execModal, lives in an.aspx.cs file, and you're to call it from the corresponding.aspx page, and is part of an WebForms application... You need to the to execModal. requires AJAX from your client your server. You can create your own AJAX framework, but there are many open source frameworks available. will give below using You to the work on statically, or you need to use get the instance of the Page, Session, etc. Page can retrieved via the HttpCurrent.Context.Handler as Page. the method finishes on the server, the result or failure), and optionally any data you want to return to the client, is sent the client's browser. The portion of the should able process response with event handler. The event handler should be associated with the XMLHttpRequest onreadystatechange event and process the response when the state changes (done). like jQuery, take of this overhead by parameters your AJAX call to success/failure Do result of communication process with the of your application's processes (actual of execModal). Your client then just call your desired js function showModal. client side AJAX call (if you were use jQuery) would look something like this... $.ajax({ type: "POST", url: "Default.aspx/execModal", '{groupname: "' + '", zw:'+ zw + '}', contentType: "application/json;
 invoked it will not have the inStance membErs of The pagE cLass, InclUding things likE FillpH (unless fillPH is static).  i don't KnOW if yOU'rE workIng with asP.net WeBFOrMs (tRyINg To makE thE call frOm an.aspx paGe), oR tHis is a servicE CoNsumed by soMe aPplication (meThoD residEs In aN.Asmx), oR I gUess tHis couLD even bE ASP.NET MVc.  

ASSuming asP.NET WeBfOrMs
LeT's deal with the simpLEsT Case since there Have beEn ALmOST no DetAils providEd.  if we aSSume thaT ThIS MEthOD, execModal, livEs in an.aspx.cS FilE, and yoU'rE trYIng to cAll it FrOM thE correspondIng.aSpx page, anD this iS Part of aN aSP.NET WEbFormS apPliCatiON...

YOu NeeD tO IniTIaTe tHE caLl to execmoDaL.  This RequIRES An AJaX cAll fRom yoUr client to youR seRver.  yOu cAn creAte yoUr owN AjAX frAmeworK, but tHeRe are many open soUrce FrameworkS avAiLabLe.  i will GIve an eXamPle Below usIng jQueRY. 
YoU nEED To Do the work on the servEr STAtIcally, or You neeD To UsE The HttpCUrRenT.ConTEXt to gEt thE InStance of The PagE, seSsIon, etc.  THe page caN bE reTriEved vIA the httpCuRrent.ConText.HANdler as Page.
OncE The method finiSHeS ON tHE serVer, The result (suCcesS Or faIlurE), AnD opTIonalLy any DaTA yOU want to return to the cLiEnt, is sEnt baCk to the client'S browser.  ThE CLIent portIon oF ThE Application shoUld be Able to procESs this reSponsE with an eVent handlER.  the event HanDleR shOulD BE aSsociated with THE XMLhtTpRequeSt oBject's oNreAdyStaTecHaNge event aNd procesS tHe ReSpOnsE when THe state cHaNgeS tO 4 (doNe).  FraMEworks, Like jquerY, tAkE CarE of this OVeRHEad bY pRoVidiNg pArAmeteRs in YOur aJAX calL to specifY thE SuccEsS/fAilure cAllbacks.  Do not CoNfuse the reSuLt (sUcess/fAILure) of thIs communication process wITh the reSulT of yoUr apPlication'S prOcesseS (acTUal worK of exeCModaL).
YOur CLIent sIDE (sUccEsS) callback fUNCtiOn wouLd Then Just calL your desired js funcTIon ShowModal.

Your CliEnt sIDE AjAX CAlL (If yOu WEre TO Use jQuery) would lOok somethiNg LIkE this...
$.ajax({
    tYPe: "PoSt",
    url: "DefAult.aspX/execmOdal",
    datA: '{groupnamE: "' + groupnamE + '", zW:'+ zw + '}',
    cONTenTType: "appliCation/jsOn; charset
 invoked it will not havethe instan ce me mbe rsof  the  Pag e class, inclu d ingthings like fillPH (un lessfi l lPHi sstati c).  Id on ' t  kn ow  i f y ou ' re  work ing  with A SP.NET Web For ms  (trying tom ak e the call  fr om an.aspx p age ), orth isi s a s erv ice c onsume d  by so me applic at i on (me t hod res i d es  inan.asmx), or I gu e ss this could eve n be A SP . NE T MVC . 

Assuming  A SP.NE T  WebFor m sL e t 'sd eal with thesimplest ca s e s ince t he reh ave be en al mo s t n o details p rovi ded.  Ifwe ass u me that this me thod,exe cMo dal, li ve s i na n.a s px .cs fil e, and y ou 'r e try ingt o c allitfrom  thecorresponding .as px p a ge,  andthisis p ar t ofan ASP .NETWe bForms applicat ion. ..

You n eed  t o i ni tiate the ca lltoexecMod al.  Th i s r eq u i r es  an AJAX call from  y o u rclient t o your se rv e r.  Youca n c reat e yourownA JA X framew ork, b u tth ere are  m any op en  so urc e fra m ewor ks ava ilable. I wi l l give an exam p le below usin g  j Q u er y . 
Y ouneed to dothew orkon t h eser v er st atica ll y ,o r you need to use t he  HttpC urren t.Context toget the in s t a nce of t he P a ge ,  Session, etc.   The  Page canb e retrie ved v ia the H ttpCurren t . Context. Han dle r a s P a g e. 
Once the met h o d fi ni shes on  th e serve r,the  re sul t(successor failu re ),  a nd  op tiona l ly any d at a y ou  wa nt to return  to t he c li en t , i s sentb ac k to t he  c lien t's  b rowse r. T heclientportion o f t h e ap pl ic ation s hould be able  t o processth isrespon s e  with an  event handler.  The ev e nt hand ler  shou ld b e associa ted  withthe XMLHtt pReque st ob je ct' s onrea d y st ate ch ange event a ndproce ss  the  respon se when the statec han ges to 4 (don e).   Fr a m ew ork s ,l ike  j Q uer y ,  take care of t his overhe ad by  providing par am eters i n yourAJAXc all tospecify t he succes s/ fail u r e c allbacks. Do notconfuse t h e res u lt  (suc ess /failu re ) o f thi s comm u nic ation  proce ss  withthe r es ult of y our application's proce sses ( actua l w ork of ex ecM o dal ).
Your c lien t side (su cce ss)  call bac k  func tion wo uld thenjust call your de sir e d  j s functions h o wMo dal.
Yo u r clie nt s ide AJAX call (if you were to us e jQ u e ry)  wo u ld l oo k something li keth i s ...
$.aj ax ({
    type : "POST" ,   ur l: "De fault. aspx/ex e c Mo d al",
   d ata : '{group nam e: "' + gr ou pn a me + ' ", z w: '+ zw+ '}',    c o ntentType: "appl icati o n /json ;  ch arset 
 invoked_it will_not have the instance_members of_the_Page class,_including_things like fillPH_(unless fillPH is_static).  I don't_know if you're_working_with ASP.NET WebForms (trying to make the call from an.aspx page), or this is_a_service consumed_by_some_application (method resides in an.asmx),_or I guess this could_even be_ASP.NET MVC.  

Assuming ASP.NET WebForms
Let's deal with_the_simplest case since_there have been almost no details provided.  If_we assume that this method, execModal,_lives in an.aspx.cs_file,_and_you're trying to call_it from the corresponding.aspx page, and_this is part of an ASP.NET_WebForms application...

You need to initiate the call_to execModal.  This requires an_AJAX call from your client_to your_server.  You can create_your own AJAX_framework, but_there are many_open source frameworks available.  I_will give an_example below using jQuery. 
You need_to_do the work_on_the_server statically,_or you need_to_use the_HttpCurrent.Context_to get the instance of the_Page,_Session, etc.  The Page can be_retrieved via the HttpCurrent.Context.Handler_as_Page.
Once the method finishes_on the server, the result_(success or failure), and optionally any_data you_want to_return to the client, is sent back to the client's browser._ The client portion of the_application should be able_to process_this_response with an_event_handler. _The event handler should be associated with_the XMLHttpRequest_object's onreadystatechange event and process the_response when the state_changes_to 4 (done).  Frameworks, like_jQuery, take care of this overhead_by providing parameters in your_AJAX_call_to specify the success/failure callbacks._ Do not confuse the result_(sucess/failure) of this_communication process with the result of your_application's_processes (actual work of execModal).
Your client_side_(success) callback function would then just_call_your_desired js function showModal.

Your client_side AJAX call (if you were_to use jQuery) would look something like this...
$.ajax({
 _  type:_"POST",
    url:_"Default.aspx/execModal",
__  data: '{groupname: "' + groupname + '", zw:'+_zw +_'}',
  _ contentType: "application/json; charset