Click here to Skip to main content
15,887,421 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: getting value zero when caculating value between dates in ado.net using asp.net with c# Pin
developerit14-Jun-10 23:50
developerit14-Jun-10 23:50 
AnswerRe: getting value zero when caculating value between dates in ado.net using asp.net with c# Pin
Tej Aj14-Jun-10 1:35
Tej Aj14-Jun-10 1:35 
GeneralRe: getting value zero when caculating value between dates in ado.net using asp.net with c# Pin
developerit14-Jun-10 21:33
developerit14-Jun-10 21:33 
GeneralRe: getting value zero when caculating value between dates in ado.net using asp.net with c# Pin
Tej Aj16-Jun-10 3:39
Tej Aj16-Jun-10 3:39 
Questionhow to implement treeview drag and drop of a node using asp.net Pin
lakshmichawala13-Jun-10 20:08
lakshmichawala13-Jun-10 20:08 
AnswerRe: how to implement treeview drag and drop of a node using asp.net Pin
Peace ON13-Jun-10 21:34
Peace ON13-Jun-10 21:34 
QuestionDatalist radiobutton onmouseover Pin
kdwarak13-Jun-10 19:59
kdwarak13-Jun-10 19:59 
QuestionExcel Field problem Pin
SreejithKumar M13-Jun-10 19:09
SreejithKumar M13-Jun-10 19:09 
Hi,

public static void ExportDataSetToExcel(DataSet ds, string filename)
{
HttpResponse response = HttpContext.Current.Response;

// first let's clean up the response.object
response.Clear();
response.Charset = "";

// set the response mime type for excel
response.ContentType = "application/vnd.ms-excel";
response.AddHeader("Content-Disposition", "attachment;filename=\"" + filename + "\"");

// create a string writer
using (StringWriter sw = new StringWriter())
{
using (HtmlTextWriter htw = new HtmlTextWriter(sw))
{
// instantiate a datagrid
DataGrid dg = new DataGrid();
dg.DataSource = ds.Tables[0];
dg.DataBind(); dg.RenderControl(htw);
response.Write(sw.ToString());
response.End();
}
}
}


This is the code which i am using to export data in excel format.But in excel it wont allow '0'(zero) number .ie for zipcode it wont allow to save 0978678 coz zero is starting element

but it will allow 890453 or 506889 like that. i just want one field (here zipcode field) as text field. Is there any way to do that?

Known is a drop, unknown is an ocean
QuestionUnable to launch the ASP.NET Development Server. Port 'n' is in use Pin
Member 391904913-Jun-10 10:57
Member 391904913-Jun-10 10:57 
AnswerRe: Unable to launch the ASP.NET Development Server. Port 'n' is in use Pin
Abhijit Jana13-Jun-10 18:05
professionalAbhijit Jana13-Jun-10 18:05 
Questionaccess ConfigurationManager.AppSettings Pin
Hemant Thaker13-Jun-10 9:03
Hemant Thaker13-Jun-10 9:03 
AnswerRe: access ConfigurationManager.AppSettings Pin
Abhijit Jana13-Jun-10 9:23
professionalAbhijit Jana13-Jun-10 9:23 
AnswerRe: access ConfigurationManager.AppSettings Pin
Abhishek Sur13-Jun-10 9:36
professionalAbhishek Sur13-Jun-10 9:36 
QuestionFCKeditor in ASP.NET 2.0 Pin
Mastersev13-Jun-10 4:26
Mastersev13-Jun-10 4:26 
AnswerRe: FCKeditor in ASP.NET 2.0 Pin
Amit Patel198514-Jun-10 1:28
Amit Patel198514-Jun-10 1:28 
GeneralRe: FCKeditor in ASP.NET 2.0 Pin
Mastersev14-Jun-10 2:19
Mastersev14-Jun-10 2:19 
QuestionPage controls keeps same content after postback? Pin
lvq68413-Jun-10 3:49
lvq68413-Jun-10 3:49 
AnswerRe: Page controls keeps same content after postback? Pin
Brij13-Jun-10 5:23
mentorBrij13-Jun-10 5:23 
AnswerRe: Page controls keeps same content after postback? Pin
Abhijit Jana13-Jun-10 9:05
professionalAbhijit Jana13-Jun-10 9:05 
GeneralRe: Page controls keeps same content after postback? Pin
Brij13-Jun-10 21:08
mentorBrij13-Jun-10 21:08 
AnswerRe: Page controls keeps same content after postback? Pin
Abhijit Jana13-Jun-10 9:00
professionalAbhijit Jana13-Jun-10 9:00 
GeneralRe: Page controls keeps same content after postback? Pin
lvq68413-Jun-10 21:17
lvq68413-Jun-10 21:17 
QuestionSome text is missing when converting from HTML to PDF! Pin
Member 446383913-Jun-10 1:24
Member 446383913-Jun-10 1:24 
Questioniam getting error in group by condition in ado.net Pin
developerit12-Jun-10 22:37
developerit12-Jun-10 22:37 
AnswerRe: iam getting error in group by condition in ado.net Pin
i.j.russell12-Jun-10 23:23
i.j.russell12-Jun-10 23:23 

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.