Click here to Skip to main content
15,890,506 members
Home / Discussions / C#
   

C#

 
QuestionKeyup event not getting triggerd Pin
Darshan BS2-Nov-15 2:01
Darshan BS2-Nov-15 2:01 
AnswerRe: Keyup event not getting triggerd Pin
Richard Deeming2-Nov-15 2:09
mveRichard Deeming2-Nov-15 2:09 
AnswerRe: Keyup event not getting triggerd Pin
Eddy Vluggen2-Nov-15 2:22
professionalEddy Vluggen2-Nov-15 2:22 
AnswerRe: Keyup event not getting triggerd Pin
BillWoodruff2-Nov-15 4:20
professionalBillWoodruff2-Nov-15 4:20 
QuestionHOW TO MAKE FONT CENTER Pin
Nor Amyliana1-Nov-15 17:50
Nor Amyliana1-Nov-15 17:50 
AnswerRe: HOW TO MAKE FONT CENTER Pin
BillWoodruff1-Nov-15 21:21
professionalBillWoodruff1-Nov-15 21:21 
GeneralRe: HOW TO MAKE FONT CENTER Pin
Nor Amyliana2-Nov-15 5:20
Nor Amyliana2-Nov-15 5:20 
QuestionCSV Downloading and Page Transfer Pin
Renjith Kalarikkal1-Nov-15 1:24
Renjith Kalarikkal1-Nov-15 1:24 
Hi,

I want to download a csv file in a button click and send back to the control to another page. I have a page a.aspx where i need to download the csv. Once i download the csv the b.aspx should be loaded. i am getting an exception cannot redirect after http headers have been sent

My code is

C#
ponse.ClearContent();

                                Response.ContentType = "application/text";


                                Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);
                                Response.Charset = "";
                                string sep = "";

                                for (int i = 0; i <= dtsorted.Columns.Count - 1; i++)
                                {


                                    Response.Write(sep + dtsorted.Columns[i].ColumnName + ',');
                                }

                                Response.Write("\r\n");

                                for (int i = 0; i < dtsorted.Rows.Count; i++)
                                {
                                    sep = "";
                                    for (int j = 0; j <= dtsorted.Columns.Count - 1; j++)
                                    {

                                        Response.Write(sep + dtsorted.Rows[i].ItemArray[j].ToString() + ',');
                                    }
                                    Response.Write("\r\n");
                                }


                                Response.SuppressContent = true;


                                Response.Redirect("VerifyLPODetails.aspx", true);
                                if (!Response.IsRequestBeingRedirected)
                                {
                                    Response.Redirect("VerifyLPODetails.aspx", true);
                                }

AnswerRe: CSV Downloading and Page Transfer Pin
Richard Deeming2-Nov-15 2:07
mveRichard Deeming2-Nov-15 2:07 
QuestionSystem.Speech.Recognition Pin
Christian 9831-Oct-15 22:21
Christian 9831-Oct-15 22:21 
AnswerRe: System.Speech.Recognition Pin
BillWoodruff31-Oct-15 22:35
professionalBillWoodruff31-Oct-15 22:35 
AnswerRe: System.Speech.Recognition Pin
Sergey Kizyan1-Nov-15 1:06
professionalSergey Kizyan1-Nov-15 1:06 
Questionc # webbrowser Windows Media Player Pin
gitokc31-Oct-15 19:30
gitokc31-Oct-15 19:30 
AnswerRe: c # webbrowser Windows Media Player Pin
Pete O'Hanlon31-Oct-15 20:43
mvePete O'Hanlon31-Oct-15 20:43 
AnswerRe: c # webbrowser Windows Media Player Pin
BillWoodruff31-Oct-15 21:20
professionalBillWoodruff31-Oct-15 21:20 
GeneralRe: c # webbrowser Windows Media Player Pin
OriginalGriff31-Oct-15 21:39
mveOriginalGriff31-Oct-15 21:39 
GeneralRe: c # webbrowser Windows Media Player Pin
BillWoodruff31-Oct-15 22:03
professionalBillWoodruff31-Oct-15 22:03 
GeneralRe: c # webbrowser Windows Media Player Pin
OriginalGriff31-Oct-15 22:08
mveOriginalGriff31-Oct-15 22:08 
Questionocr experts Pin
iqballll31-Oct-15 2:47
iqballll31-Oct-15 2:47 
AnswerRe: ocr experts Pin
OriginalGriff31-Oct-15 2:49
mveOriginalGriff31-Oct-15 2:49 
GeneralRe: ocr experts Pin
iqballll31-Oct-15 2:51
iqballll31-Oct-15 2:51 
QuestionLooking for a solution for combine WebService and jQuery (web app) Pin
goldsoft30-Oct-15 23:29
goldsoft30-Oct-15 23:29 
Answer[REPOST] Looking for a solution for combine WebService and jQuery (web app) Pin
Richard Deeming2-Nov-15 1:57
mveRichard Deeming2-Nov-15 1:57 
Questionwhy I can't install SQL Server Compact Database for SQL Server Management Studio ? Pin
Member 245846730-Oct-15 18:17
Member 245846730-Oct-15 18:17 
AnswerRe: why I can't install SQL Server Compact Database for SQL Server Management Studio ? Pin
John Torjo31-Oct-15 0:30
professionalJohn Torjo31-Oct-15 0:30 

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.