Click here to Skip to main content
15,914,226 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Sql File Connection Error when Web App is Deployed to Remote/Hosting Server (works locally though) Pin
N a v a n e e t h11-Dec-07 16:56
N a v a n e e t h11-Dec-07 16:56 
GeneralRe: Sql File Connection Error when Web App is Deployed to Remote/Hosting Server (works locally though) Pin
dboy22111-Dec-07 17:21
dboy22111-Dec-07 17:21 
GeneralRe: Sql File Connection Error when Web App is Deployed to Remote/Hosting Server (works locally though) Pin
Venkatesh Mookkan11-Dec-07 16:56
Venkatesh Mookkan11-Dec-07 16:56 
GeneralRe: Sql File Connection Error when Web App is Deployed to Remote/Hosting Server (works locally though) Pin
Michael Sync11-Dec-07 17:02
Michael Sync11-Dec-07 17:02 
GeneralRe: Sql File Connection Error when Web App is Deployed to Remote/Hosting Server (works locally though) Pin
dboy22112-Dec-07 6:11
dboy22112-Dec-07 6:11 
GeneralRe: Sql File Connection Error when Web App is Deployed to Remote/Hosting Server (works locally though) Pin
Michael Sync12-Dec-07 6:21
Michael Sync12-Dec-07 6:21 
GeneralRe: Sql File Connection Error when Web App is Deployed to Remote/Hosting Server (works locally though) Pin
dboy22112-Dec-07 8:01
dboy22112-Dec-07 8:01 
QuestionHow to export All records from gridview to excel when paging in gridview Pin
$unil Dhiman11-Dec-07 14:47
$unil Dhiman11-Dec-07 14:47 
Hi All,
I want to export to Excel from gridview. I have implemented it.
But if there is paging in gridview, it export only the rows on the particular page.
I want to Export All Rows of all pages.
for example I have 50 records and page size is 10. then there will be 5 pages
10 records per page. if I will export from page 1 then only 10 records will be export.
I want to export All 50 records once.

I use this code to Export to excel :
protected void ExportGridView(Control grdView, string strFileName)
{

string strfName = Server.UrlPathEncode(strFileName);

string attachment = "attachment; filename=" + strfName + ".xls";

Response.ClearContent();

Response.Buffer = true;

Response.AddHeader("content-disposition", attachment);

Response.ContentType = "application/unknown";

System.Web.HttpContext.Current.Response.Write("<meta http-equiv=Content-Type content='text/html; charset=utf-8'>");

StringWriter sw = new StringWriter();

HtmlTextWriter htw = new HtmlTextWriter(sw);

grdView.RenderControl(htw);

Response.Write(sw.ToString());

Response.End();

}

Plz Help me.
GeneralRe: How to export All records from gridview to excel when paging in gridview Pin
Michael Sync11-Dec-07 16:50
Michael Sync11-Dec-07 16:50 
GeneralRe: How to export All records from gridview to excel when paging in gridview Pin
$unil Dhiman11-Dec-07 17:28
$unil Dhiman11-Dec-07 17:28 
GeneralGodaddy ?! Pin
sergeyv200211-Dec-07 11:03
sergeyv200211-Dec-07 11:03 
GeneralRe: Godaddy ?! Pin
Christian Graus11-Dec-07 13:26
protectorChristian Graus11-Dec-07 13:26 
GeneralRe: Godaddy ?! Pin
sergeyv200211-Dec-07 14:11
sergeyv200211-Dec-07 14:11 
GeneralRe: Godaddy ?! Pin
Christian Graus11-Dec-07 16:43
protectorChristian Graus11-Dec-07 16:43 
GeneralRe: Godaddy ?! Pin
Michael Sync11-Dec-07 15:38
Michael Sync11-Dec-07 15:38 
GeneralIE Cookie Problem Pin
FinnGrimw11-Dec-07 10:06
FinnGrimw11-Dec-07 10:06 
GeneralRe: IE Cookie Problem Pin
Michael Sync11-Dec-07 15:47
Michael Sync11-Dec-07 15:47 
GeneralDotNet Application Pin
vasini11-Dec-07 9:53
vasini11-Dec-07 9:53 
GeneralRe: DotNet Application Pin
Pete O'Hanlon11-Dec-07 11:09
mvePete O'Hanlon11-Dec-07 11:09 
GeneralRe: DotNet Application Pin
YeHtut11-Dec-07 16:17
YeHtut11-Dec-07 16:17 
GeneralRe: DotNet Application Pin
Michael Sync11-Dec-07 17:10
Michael Sync11-Dec-07 17:10 
Generaliunno Pin
jer marshall11-Dec-07 8:24
jer marshall11-Dec-07 8:24 
GeneralRe: iunno Pin
Pete O'Hanlon11-Dec-07 11:06
mvePete O'Hanlon11-Dec-07 11:06 
GeneralRe: iunno Pin
Christian Graus11-Dec-07 13:30
protectorChristian Graus11-Dec-07 13:30 
GeneralRe: iunno Pin
Pete O'Hanlon11-Dec-07 21:55
mvePete O'Hanlon11-Dec-07 21:55 

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.