Thread was being aborted Error ? In asp.net? -
in web application, using code, download documnet uploaded, written in item command event of datalist, s giving error "thread being aborted" can me solve this, thank you. code fallows.
protected void dtlstmagazine_itemcommand(object source, datalistcommandeventargs e) {    try     {      objitmagbe.titleid = convert.toint32(e.commandargument);     dts = new dataset();     dts = objitmagbl.getmagzinebytitleid(objitmagbe);     getpopularmagazine();      string myfile = "../xxxx/datafiles/" + dts.tables[0].rows[0]["files"].tostring();     if (file.exists(server.mappath(myfile)) == true)     {         response.appendheader("content-disposition", "attachment; filename=" + myfile);         response.transmitfile(server.mappath(myfile));         response.end();         response.flush();     }    }    catch    {      } } 
your response.end() causing that. because telling asp.net request over.
what stack trace exception, .net think exception being thrown from?
Comments
Post a Comment