Click here to Skip to main content
15,913,361 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRe: Force the page to postback(update) from another page Pin
Chesnokov Yuriy14-Aug-09 1:22
professionalChesnokov Yuriy14-Aug-09 1:22 
AnswerRe: Force the page to postback(update) from another page Pin
Parwej Ahamad14-Aug-09 1:24
professionalParwej Ahamad14-Aug-09 1:24 
GeneralRe: Force the page to postback(update) from another page Pin
Abhishek Sur14-Aug-09 1:15
professionalAbhishek Sur14-Aug-09 1:15 
QuestionRe: Force the page to postback(update) from another page Pin
Chesnokov Yuriy14-Aug-09 1:26
professionalChesnokov Yuriy14-Aug-09 1:26 
AnswerRe: Force the page to postback(update) from another page Pin
Abhishek Sur14-Aug-09 1:30
professionalAbhishek Sur14-Aug-09 1:30 
GeneralRe: Force the page to postback(update) from another page Pin
Chesnokov Yuriy14-Aug-09 1:44
professionalChesnokov Yuriy14-Aug-09 1:44 
GeneralRe: Force the page to postback(update) from another page Pin
Abhishek Sur14-Aug-09 2:19
professionalAbhishek Sur14-Aug-09 2:19 
QuestionDownload a file from db Pin
janani1314-Aug-09 0:10
janani1314-Aug-09 0:10 
hi all,
I want to download the file from db which has been save in my application.I downloaded the file . but i want to open it as a pdf file.How to do that..

Here is the code i used to download.
if (e.CommandName == "ResumeDownload")
   {

       Cache["filename"] = e.CommandArgument.ToString();

       String strRequest = Cache["filename"].ToString();// '-- if something was passed to the file querystring

       if (strRequest != "")  // 'get absolute path of the file
       {
           String path = Server.MapPath("Attachments\\" + strRequest);// 'get file object as FileInfo

           FileInfo file = new FileInfo(path);// '-- if the file exists on the server

           if (file.Exists)
           {

               Response.Clear();
               Response.AddHeader("Content-Disposition", "attachment; filename=\"" + file.Name.ToString()+ "\"");
               Response.AddHeader("Content-Length", file.Length.ToString());
               Response.ContentType = "application/octet-stream";
               Response.WriteFile(file.FullName);
               Response.End();// 'if file does not exist

           }
           else
               ClientScript.RegisterStartupScript(typeof(Page), "alert", "<script>alert('File Not Found')</script>");
       }
       else
           Response.Write("Please provide a file to download.");

   }

AnswerRe: Download a file from db Pin
DoctorMick14-Aug-09 0:23
DoctorMick14-Aug-09 0:23 
GeneralRe: Download a file from db Pin
janani1314-Aug-09 0:26
janani1314-Aug-09 0:26 
GeneralRe: Download a file from db Pin
padmanabhan N14-Aug-09 0:46
padmanabhan N14-Aug-09 0:46 
QuestionUsing Hashtable in Web service..... Pin
Rohit Kulkarni14-Aug-09 0:05
Rohit Kulkarni14-Aug-09 0:05 
AnswerRe: Using Hashtable in Web service..... Pin
Parwej Ahamad14-Aug-09 0:12
professionalParwej Ahamad14-Aug-09 0:12 
Questioncommon Stored Procedure Pin
rinku soni 2314-Aug-09 0:03
rinku soni 2314-Aug-09 0:03 
AnswerRe: common Stored Procedure Pin
padmanabhan N14-Aug-09 0:08
padmanabhan N14-Aug-09 0:08 
AnswerRe: common Stored Procedure Pin
Parwej Ahamad14-Aug-09 0:09
professionalParwej Ahamad14-Aug-09 0:09 
AnswerRe: common Stored Procedure Pin
mylogics14-Aug-09 0:09
professionalmylogics14-Aug-09 0:09 
AnswerRe: common Stored Procedure Pin
Abhishek Sur14-Aug-09 0:17
professionalAbhishek Sur14-Aug-09 0:17 
Questiondropdownlist Pin
mylogics14-Aug-09 0:03
professionalmylogics14-Aug-09 0:03 
AnswerRe: dropdownlist Pin
padmanabhan N14-Aug-09 0:11
padmanabhan N14-Aug-09 0:11 
GeneralRe: dropdownlist Pin
mylogics14-Aug-09 0:18
professionalmylogics14-Aug-09 0:18 
GeneralRe: dropdownlist Pin
mylogics14-Aug-09 0:23
professionalmylogics14-Aug-09 0:23 
GeneralRe: dropdownlist Pin
padmanabhan N14-Aug-09 0:48
padmanabhan N14-Aug-09 0:48 
GeneralRe: dropdownlist Pin
DoctorMick14-Aug-09 0:27
DoctorMick14-Aug-09 0:27 
AnswerRe: dropdownlist Pin
khuzwayom14-Aug-09 0:24
khuzwayom14-Aug-09 0:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.