Click here to Skip to main content
15,885,365 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionJquery code is not working in IE [modified] Pin
meghamaharshi19-Jul-11 1:16
meghamaharshi19-Jul-11 1:16 
AnswerRe: Jquery code is not working in IE Pin
Shameel19-Jul-11 4:49
professionalShameel19-Jul-11 4:49 
AnswerRe: Jquery code is not working in IE Pin
Not Active19-Jul-11 7:49
mentorNot Active19-Jul-11 7:49 
QuestionASP.NET Login Control always logged in Pin
Dominick Marciano18-Jul-11 18:18
professionalDominick Marciano18-Jul-11 18:18 
AnswerRe: ASP.NET Login Control always logged in Pin
Dominick Marciano18-Jul-11 18:44
professionalDominick Marciano18-Jul-11 18:44 
QuestionHelp with page.header.controls.add() throw NullReferenceException. [modified] Pin
josehidalgor18-Jul-11 12:44
josehidalgor18-Jul-11 12:44 
AnswerRe: Help with page.header.controls.add() throw NullReferenceException. Pin
Parwej Ahamad19-Jul-11 8:33
professionalParwej Ahamad19-Jul-11 8:33 
QuestionGridview To Export Excel sheet Pin
vishnukamath18-Jul-11 0:07
vishnukamath18-Jul-11 0:07 
Hi,

I tried with below code for export gridview to Excell and it is adding empty row for every record . Please suggest me better way to do this.



My Code:
--------------

response.Clear();
response.ClearContent();
response.Buffer = true;
response.ContentType = "application/vnd.ms-excel";
response.Charset = "";
//--code to display multiline value in same cell in excel-------------------
string header = @"




";
response.Write(header);
response.AddHeader("mso-data-placement", "same-cell");
response.AddHeader("content-disposition", new StringBuilder("attachment; filename=").Append(fileName).Append(".xls").ToString());
}
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);

gvControl.RenderControl(oHtmlTextWriter);
// response.Write(oStringWriter.ToString().Replace("bordercolor=\"white\"", String.Empty));
response.Write(Regex.Replace(oStringWriter.ToString().Replace("bordercolor=\"white\"", String.Empty).ToString(), @"(<a[^>]*>)|
()", " ", RegexOptions.IgnoreCase));
response.End();



---------------------------

Regards,
Vishnu.
SuggestionRe: Gridview To Export Excel sheet Pin
RaviRanjanKr18-Jul-11 1:23
professionalRaviRanjanKr18-Jul-11 1:23 
AnswerRe: Gridview To Export Excel sheet Pin
R. Giskard Reventlov18-Jul-11 4:19
R. Giskard Reventlov18-Jul-11 4:19 
Questionresponse.redirect afetr few seconds Pin
benams17-Jul-11 11:35
benams17-Jul-11 11:35 
AnswerRe: response.redirect afetr few seconds Pin
Parwej Ahamad17-Jul-11 19:48
professionalParwej Ahamad17-Jul-11 19:48 
AnswerRe: response.redirect afetr few seconds Pin
Morgs Morgan7-Aug-11 23:53
Morgs Morgan7-Aug-11 23:53 
QuestionSSRS run time design Pin
Ramkumar_S17-Jul-11 3:14
Ramkumar_S17-Jul-11 3:14 
QuestionRe: SSRS run time design Pin
Shameel17-Jul-11 23:16
professionalShameel17-Jul-11 23:16 
QuestionASP.NET Windows Based Auth Question Pin
Badg3r197715-Jul-11 5:46
Badg3r197715-Jul-11 5:46 
AnswerRe: ASP.NET Windows Based Auth Question Pin
David Mujica15-Jul-11 5:58
David Mujica15-Jul-11 5:58 
AnswerRe: ASP.NET Windows Based Auth Question Pin
Shameel17-Jul-11 23:21
professionalShameel17-Jul-11 23:21 
QuestionHow to integrate facebook on a site? Pin
alexa_adrian200114-Jul-11 23:02
alexa_adrian200114-Jul-11 23:02 
AnswerRe: How to integrate facebook on a site? Pin
Not Active15-Jul-11 2:29
mentorNot Active15-Jul-11 2:29 
GeneralRe: How to integrate facebook on a site? Pin
alexa_adrian200115-Jul-11 2:32
alexa_adrian200115-Jul-11 2:32 
GeneralRe: How to integrate facebook on a site? Pin
DaveAuld17-Jul-11 20:10
professionalDaveAuld17-Jul-11 20:10 
GeneralRe: How to integrate facebook on a site? Pin
alexa_adrian200117-Jul-11 20:43
alexa_adrian200117-Jul-11 20:43 
Questionhow can i add row to table dynamically? Pin
buffering8314-Jul-11 19:57
buffering8314-Jul-11 19:57 
AnswerGridview Pin
David Mujica15-Jul-11 2:41
David Mujica15-Jul-11 2:41 

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.