javascript - ASP.NET AJAX for window CE IE 7 - out of memory exception -


working on 1 application display image different directory such 'c:\core\gate1\gate1.jpg' using ajax timer , refreshing page display newly updated image. working 4 5 hours throwing out of memory error.

the web page access through window ce 6.5 , ie 7 on device.

i suspect problem window ce browser, there no other way read images different directory.

javascript won't allow because security threat.

is there fix issue. suggestion appreciated.

here update panel:

  <asp:updatepanel id="updatepanel1" runat="server" updatemode="conditional">         <contenttemplate>             <asp:timer id="imagetimer" enabled="true" interval="100" runat="server" ontick="timer1_tick">             </asp:timer>             <div>                 <asp:image id="image1" runat="server" height="120px" width="100px" />                 </div>                 </contenttemplate>         <triggers>         <asp:asyncpostbacktrigger controlid="imagetimer" eventname="tick" />         </triggers>     </asp:updatepanel> 

timer tick code:

protected void timer1_tick(object sender, eventargs e) {     try     {         string gatename = ddlgate.selecteditem.tostring();          string path = imageloc + gatename + "\\" + gatename + ".jpg";         string actualcardid = string.empty;         gatemanager.gatedata gatedata = new gatemanager.gatedata();         gatedata = gatemanager.getgatedata(gatename);         actualcardid = gatedata.cardid;         lblname.text = gatedata.firstname + " " + gatedata.lastname;         lblexp.text = gatedata.exp;          if (actualcardid != "notfound" && actualcardid != "invalid"              && actualcardid != "" && !string.isnullorempty(actualcardid))         {             image1.imageurl = "image.aspx?path=" + path + "&cardid=" + actualcardid;         }         else if (actualcardid == "notfound")         {             //get image dir             image1.imageurl = "images/imagenotfound.jpg";         }         else if (actualcardid == "" || actualcardid == null)         {             image1.imageurl = "images/imagenotfound.jpg";         }         else if (actualcardid == "invalid")         {             //get image dir             image1.imageurl = "images/invalidcard.jpg";         }     }     catch     {     } } 

updated: image.aspx code:

protected void page_load(object sender, eventargs e) {     try     {         response.contenttype = "image/jpeg"; // jpeg file         string physicalfilename = request.querystring["path"];         response.writefile(physicalfilename);     }     catch     {     } } 


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -