Click here to Skip to main content
15,900,378 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionInternal .net Framework Data Provider Error 1. Pin
Sebastian T Xavier1-Jul-07 18:13
Sebastian T Xavier1-Jul-07 18:13 
AnswerRe: Internal .net Framework Data Provider Error 1. Pin
Sathesh Sakthivel1-Jul-07 18:29
Sathesh Sakthivel1-Jul-07 18:29 
GeneralRe: Internal .net Framework Data Provider Error 1. Pin
Sebastian T Xavier1-Jul-07 19:43
Sebastian T Xavier1-Jul-07 19:43 
GeneralRe: Internal .net Framework Data Provider Error 1. Pin
Sathesh Sakthivel1-Jul-07 19:46
Sathesh Sakthivel1-Jul-07 19:46 
QuestionASP.NET and SQL Server 2000 problems Pin
anystudent1-Jul-07 18:06
anystudent1-Jul-07 18:06 
AnswerRe: ASP.NET and SQL Server 2000 problems Pin
postmaster@programmingknowledge.com1-Jul-07 18:17
postmaster@programmingknowledge.com1-Jul-07 18:17 
AnswerRe: ASP.NET and SQL Server 2000 problems Pin
Sathesh Sakthivel1-Jul-07 18:24
Sathesh Sakthivel1-Jul-07 18:24 
QuestionExcel GridView To Excel and and format the excel look Pin
Jia Fang1-Jul-07 17:02
Jia Fang1-Jul-07 17:02 
Hi,
I have exported my data in gridview to excel sheet but i have a problem to format the excel cell through my code. my gridview data has line break in some of the column
, when exported to excel, it will occupy few rows instead, I need to format the data such that each order will occupy one row for easy data auditing.

I'm using this code to export the data:
string filename = System.Configuration.ConfigurationManager.AppSettings["ExcelFilename"];
string style = " .style0 {vertical-align:top;} ";

// all roles exported turn off paging and rebind the grid before sending it to export
this.GridView1.AllowPaging = false;
this.GridView1.DataSource = (DataView)Session["OrderList"];
this.GridView1.DataBind();
DisableControls(GridView1);

Response.Clear();
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xls", filename));
Response.Charset = "";
Response.ContentType = "application/vnd.xls";

StringWriter stringWrite = new StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
this.GridView1.RenderControl(htmlWrite);

//style is added dynamically
Response.Write(style);
Response.Write(stringWrite.ToString());

Response.End();
QuestionASP.Net Membership New Problem.... Pin
Amit Kumar G1-Jul-07 13:43
Amit Kumar G1-Jul-07 13:43 
AnswerRe: ASP.Net Membership New Problem.... Pin
Amit Kumar G1-Jul-07 14:25
Amit Kumar G1-Jul-07 14:25 
QuestionAsp.Net Membership Role Mgt Pin
Amit Kumar G1-Jul-07 12:33
Amit Kumar G1-Jul-07 12:33 
QuestionDataSets--Kindly Help... Pin
SrividhyaS1-Jul-07 8:32
SrividhyaS1-Jul-07 8:32 
AnswerRe: DataSets--Kindly Help... Pin
Not Active1-Jul-07 11:55
mentorNot Active1-Jul-07 11:55 
AnswerRe: DataSets--Kindly Help... Pin
Steve Echols1-Jul-07 17:43
Steve Echols1-Jul-07 17:43 
AnswerRe: DataSets--Kindly Help... Pin
.NetRams2-Jul-07 0:36
.NetRams2-Jul-07 0:36 
GeneralRe: DataSets--Kindly Help... Pin
Blumen2-Jul-07 1:07
Blumen2-Jul-07 1:07 
QuestionHow to use client side custom validator Pin
Hemant Garg1-Jul-07 6:19
Hemant Garg1-Jul-07 6:19 
AnswerRe: How to use client side custom validator Pin
Not Active1-Jul-07 7:35
mentorNot Active1-Jul-07 7:35 
AnswerRe: How to use client side custom validator Pin
koolprasad20031-Jul-07 23:44
professionalkoolprasad20031-Jul-07 23:44 
QuestionAds that move across the page from left to right?? [modified] Pin
Nada Adel1-Jul-07 3:40
Nada Adel1-Jul-07 3:40 
AnswerRe: Ads that move across the page from left to right?? Pin
Sylvester george1-Jul-07 18:56
Sylvester george1-Jul-07 18:56 
QuestionI need help! please Pin
Junior Boy1-Jul-07 0:24
Junior Boy1-Jul-07 0:24 
AnswerRe: I need help! please Pin
Guffa1-Jul-07 6:54
Guffa1-Jul-07 6:54 
AnswerRe: I need help! please Pin
blue_arc1-Jul-07 19:23
blue_arc1-Jul-07 19:23 
GeneralRe: I need help! please Pin
Junior Boy1-Jul-07 21:11
Junior Boy1-Jul-07 21:11 

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.