Click here to Skip to main content
15,909,091 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: unable to open file in new window using hyper link(physical path) Pin
Sun Rays10-Dec-07 1:02
Sun Rays10-Dec-07 1:02 
GeneralRe: unable to open file in new window using hyper link(physical path) Pin
kinnuP10-Dec-07 3:00
kinnuP10-Dec-07 3:00 
GeneralReport Items tab in toolbar missing... [modified] Pin
zareee9-Dec-07 23:04
zareee9-Dec-07 23:04 
Generalzip download with aspx Pin
gottimukkala9-Dec-07 23:02
gottimukkala9-Dec-07 23:02 
Generaltreeview control Pin
RajeevKumarSharma9-Dec-07 22:39
RajeevKumarSharma9-Dec-07 22:39 
GeneralRe: treeview control Pin
Michael Sync10-Dec-07 1:18
Michael Sync10-Dec-07 1:18 
GeneralRe: treeview control Pin
Sun Rays10-Dec-07 1:36
Sun Rays10-Dec-07 1:36 
Generalexcel Pin
niki_nilu9-Dec-07 22:26
niki_nilu9-Dec-07 22:26 
hi
i want on butttonclick event all data transfer in excel and save it.
in my code when i click on btnSaveToExcel button that time one dialogbox open wheh ask you want to save file in .exe . if yes click then file saved on desktop or whtever path.but when you want to open it that time excel open but there one popupbox comming which have message unable to read file.
pls help me.
this is my code


protected void btnSaveToExcel_Click(object sender, EventArgs e)
{
objVarInit.sqlDS.Reset();
objVarInit.sqlDT.Reset();
objClsDllSql.sqlCon = objReadIniFile.funReadIniSql();
objClsDllSql.sqlCon.Open();
objVarInit.sqlDA = new SqlDataAdapter("select * from tUser", objClsDllSql.sqlCon);
//objVarInit.sqlDT = new DataTable();
objVarInit.sqlDA.Fill(objVarInit.sqlDT);
objClsDllSql.sqlCon.Close();
Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
string sep = "";
foreach (DataColumn dc in objVarInit.sqlDT.Columns)
{
Response.Write(sep + dc.ColumnName);
sep = "\t";
}
Response.Write("\n");

int i;
foreach (DataRow dr in objVarInit.sqlDT.Rows)
{
sep = "";
for (i = 0; i < objVarInit.sqlDT.Columns.Count; i++)
{
Response.Write(sep + dr[i].ToString());
sep = "\t";
}
Response.Write("\n");
}

}

Gayatri

GeneralRe: excel Pin
Christian Graus9-Dec-07 22:49
protectorChristian Graus9-Dec-07 22:49 
GeneralRe: excel Pin
niki_nilu9-Dec-07 23:00
niki_nilu9-Dec-07 23:00 
GeneralRe: excel [modified] Pin
Prateek G9-Dec-07 22:59
Prateek G9-Dec-07 22:59 
Generalasp.net webpage fails to load a C# windows control in it Pin
Naveen Gowda9-Dec-07 22:08
Naveen Gowda9-Dec-07 22:08 
GeneralCross post. Please ignore Pin
Pete O'Hanlon10-Dec-07 0:04
mvePete O'Hanlon10-Dec-07 0:04 
GeneralCrystal Reprot logon problem Pin
Raza Hussain9-Dec-07 21:25
Raza Hussain9-Dec-07 21:25 
GeneralRe: Crystal Reprot logon problem Pin
Raza Hussain10-Dec-07 0:14
Raza Hussain10-Dec-07 0:14 
QuestionTo upload a file without using upload file ? Pin
jagadeeshkumar19849-Dec-07 20:19
jagadeeshkumar19849-Dec-07 20:19 
AnswerRe: To upload a file without using upload file ? Pin
N a v a n e e t h9-Dec-07 20:30
N a v a n e e t h9-Dec-07 20:30 
AnswerRe: To upload a file without using upload file ? Pin
Christian Graus9-Dec-07 21:16
protectorChristian Graus9-Dec-07 21:16 
GeneralDataList Item Enumeration in ASP .NET 2.0 Pin
ReactiveX9-Dec-07 20:01
ReactiveX9-Dec-07 20:01 
GeneralRe: DataList Item Enumeration in ASP .NET 2.0 Pin
ReactiveX9-Dec-07 20:42
ReactiveX9-Dec-07 20:42 
QuestionEncrypt and Decrypt? Pin
Kasi Viswanathan9-Dec-07 19:51
Kasi Viswanathan9-Dec-07 19:51 
GeneralRe: Encrypt and Decrypt? Pin
Christian Graus9-Dec-07 19:52
protectorChristian Graus9-Dec-07 19:52 
GeneralRe: Encrypt and Decrypt? Pin
Michael Sync9-Dec-07 20:56
Michael Sync9-Dec-07 20:56 
QuestionDownload File Pin
serene joey9-Dec-07 19:46
serene joey9-Dec-07 19:46 
GeneralRe: Download File Pin
Christian Graus9-Dec-07 19:54
protectorChristian Graus9-Dec-07 19:54 

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.