Click here to Skip to main content
15,889,200 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How to learn C# in Asp.net Mvc Pin
Richard MacCutchan2-Mar-16 1:49
mveRichard MacCutchan2-Mar-16 1:49 
AnswerRe: How to learn C# in Asp.net Mvc Pin
Manas_Kumar2-Mar-16 18:53
professionalManas_Kumar2-Mar-16 18:53 
AnswerRe: How to learn C# in Asp.net Mvc Pin
Frank Kerrigan4-Mar-16 3:58
Frank Kerrigan4-Mar-16 3:58 
AnswerRe: How to learn C# in Asp.net Mvc Pin
aarif moh shaikh10-Mar-16 20:50
professionalaarif moh shaikh10-Mar-16 20:50 
QuestionVisual Studio 2015 and Metro-UI Pin
xiecsuk29-Feb-16 22:59
xiecsuk29-Feb-16 22:59 
QuestionOpening word/pdf document in another window Pin
indian14329-Feb-16 15:39
indian14329-Feb-16 15:39 
AnswerRe: Opening word/pdf document in another window Pin
Richard MacCutchan29-Feb-16 22:04
mveRichard MacCutchan29-Feb-16 22:04 
GeneralRe: Opening word/pdf document in another window Pin
indian14329-Feb-16 22:26
indian14329-Feb-16 22:26 
Hi I tried this way but it shows me the document in binary format
protected void Page_Load(object sender, EventArgs e)
        {
            Investigator _objInvestigator = new Investigator();
            InvestigatorService _objinvestigatorService = new InvestigatorService();

            int InvestigatorId;
            InvestigatorId = ((Session["InvestigatorId"] != null) && int.TryParse(Session["InvestigatorId"].ToString(), out InvestigatorId)) ? InvestigatorId : 0;
            _objInvestigator = _objinvestigatorService.GetByInvestigatorId(InvestigatorId);
            if (_objInvestigator != null)
            {
                if ((_objInvestigator.CvFile != null) && !string.IsNullOrEmpty(_objInvestigator.CvFileNameWithExt))
                {
                    String ext = System.IO.Path.GetExtension(_objInvestigator.CvFileNameWithExt);

                        Response.ContentType = "application/" + ext;
                        Response.AddHeader("content-length", _objInvestigator.CvFile.Length.ToString());
                        Response.BinaryWrite(_objInvestigator.CvFile);

                }
            }

        }  
And this the code for link button click
protected void loadFile_Click(object sender, EventArgs e)
       {
           Response.Write(string.Format("<script>window.open('{0}','_blank');</script>", "TheFile.aspx"));
       }

Any suggestions please?
Thanks,

Abdul Aleem

"There is already enough hatred in the world lets spread love, compassion and affection."

GeneralRe: Opening word/pdf document in another window Pin
Blikkies29-Feb-16 23:01
professionalBlikkies29-Feb-16 23:01 
GeneralRe: Opening word/pdf document in another window Pin
indian1431-Mar-16 6:06
indian1431-Mar-16 6:06 
GeneralRe: Opening word/pdf document in another window Pin
indian1431-Mar-16 6:08
indian1431-Mar-16 6:08 
GeneralRe: Opening word/pdf document in another window Pin
indian1431-Mar-16 6:22
indian1431-Mar-16 6:22 
GeneralRe: Opening word/pdf document in another window Pin
Blikkies1-Mar-16 19:48
professionalBlikkies1-Mar-16 19:48 
GeneralRe: Opening word/pdf document in another window Pin
indian1432-Mar-16 15:18
indian1432-Mar-16 15:18 
AnswerRe: Opening word/pdf document in another window Pin
Blikkies29-Feb-16 22:09
professionalBlikkies29-Feb-16 22:09 
QuestionResizing Images, from Bytes[] back to bytes[] Pin
jkirkerx29-Feb-16 10:47
professionaljkirkerx29-Feb-16 10:47 
AnswerRe: Resizing Images, from Bytes[] back to bytes[] [I think its solved] Pin
jkirkerx29-Feb-16 11:45
professionaljkirkerx29-Feb-16 11:45 
General[Now it works], but needs advice on disposing Pin
jkirkerx29-Feb-16 12:51
professionaljkirkerx29-Feb-16 12:51 
QuestionAn Ajax Control is working on local machine not working on Server when deployed Pin
indian14327-Feb-16 14:32
indian14327-Feb-16 14:32 
AnswerRe: An Ajax Control is working on local machine not working on Server when deployed Pin
Nathan Minier29-Feb-16 1:36
professionalNathan Minier29-Feb-16 1:36 
GeneralRe: An Ajax Control is working on local machine not working on Server when deployed Pin
indian14329-Feb-16 11:10
indian14329-Feb-16 11:10 
QuestionASP.Net Pin
Member 1235142825-Feb-16 3:05
Member 1235142825-Feb-16 3:05 
AnswerRe: ASP.Net Pin
ZurdoDev25-Feb-16 4:09
professionalZurdoDev25-Feb-16 4:09 
AnswerRe: ASP.Net Pin
F-ES Sitecore25-Feb-16 21:52
professionalF-ES Sitecore25-Feb-16 21:52 
AnswerRe: ASP.Net Pin
Nathan Minier26-Feb-16 1:29
professionalNathan Minier26-Feb-16 1:29 

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.