Click here to Skip to main content
15,891,473 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAssigning roles using windows authentication in asp.net2.0 Pin
JacquesDP26-Aug-07 20:29
JacquesDP26-Aug-07 20:29 
AnswerRe: Assigning roles using windows authentication in asp.net2.0 Pin
Michael Sync26-Aug-07 20:39
Michael Sync26-Aug-07 20:39 
GeneralRe: Assigning roles using windows authentication in asp.net2.0 Pin
JacquesDP26-Aug-07 21:04
JacquesDP26-Aug-07 21:04 
GeneralRe: Assigning roles using windows authentication in asp.net2.0 Pin
JacquesDP26-Aug-07 22:37
JacquesDP26-Aug-07 22:37 
Questionhow to export gridview data to new pdf file without using third party tool / library in ASP.net 2.0 [modified] Pin
here2learn26-Aug-07 20:10
here2learn26-Aug-07 20:10 
AnswerRe: how to export gridview data to new pdf file without using third party tool / library in ASP.net 2.0 Pin
mihirhp26-Aug-07 21:35
mihirhp26-Aug-07 21:35 
GeneralRe: how to export gridview data to new pdf file without using third party tool / library in ASP.net 2.0 Pin
here2learn26-Aug-07 21:46
here2learn26-Aug-07 21:46 
GeneralRe: how to export gridview data to new pdf file without using third party tool / library in ASP.net 2.0 Pin
mihirhp27-Aug-07 2:01
mihirhp27-Aug-07 2:01 
Ok...


Then will it work if the output file is in excel format .... if yes.... try following code...

using System.Data.SqlClient;
using System.IO;

try
{
string strLine = "";
object filePath;
object fileName;
object filePDF;
FileStream objFileStream;
StreamWriter objStreamWriter;

//Create a pseudo-random file name.
filePDF = "Test.xls";

//Set a virtual folder to save the file.
//Make sure that you change the application name to match your folder.
filePath = HttpContext.Current.Server.MapPath("\\Mihir\\Gridview20Excel\\Output");
fileName = filePath + "\\" + filePDF;

//Use FileStream to create the .xls file.
objFileStream = new FileStream(fileName.ToString(), FileMode.OpenOrCreate, FileAccess.Write);
objStreamWriter = new StreamWriter(objFileStream);

//Take the string for data.
strLine = "";

//Enumerate the data that is used to populate the file.
for (int i = 0; i < GridView1.Rows.Count; i++)
{
for (int j = 0; j < GridView1.Rows[i].Cells.Count; j++)
{
strLine = strLine + GridView1.Rows[i].Cells[j].Text + "\t"; // +Strings.Chr(9);
//objStreamWriter
}
objStreamWriter.WriteLine(strLine);
strLine = "";
}

//Clean up.
objStreamWriter.Close();
objFileStream.Close();
}
catch (Exception)
{
throw;
}
GeneralRe: how to export gridview data to new pdf file without using third party tool / library in ASP.net 2.0 Pin
here2learn27-Aug-07 2:16
here2learn27-Aug-07 2:16 
GeneralRe: how to export gridview data to new pdf file without using third party tool / library in ASP.net 2.0 Pin
mihirhp27-Aug-07 2:59
mihirhp27-Aug-07 2:59 
GeneralRe: how to export gridview data to new pdf file without using third party tool / library in ASP.net 2.0 Pin
here2learn27-Aug-07 3:01
here2learn27-Aug-07 3:01 
QuestionA potentially dangerous Request.Form value was detected from the client !!!! Pin
B.A26-Aug-07 20:06
B.A26-Aug-07 20:06 
AnswerRe: A potentially dangerous Request.Form value was detected from the client !!!! Pin
John-ph26-Aug-07 20:27
John-ph26-Aug-07 20:27 
GeneralRe: A potentially dangerous Request.Form value was detected from the client !!!! Pin
B.A26-Aug-07 21:35
B.A26-Aug-07 21:35 
QuestionASP.NET "Overlay" Pin
jayarajmrj26-Aug-07 19:31
jayarajmrj26-Aug-07 19:31 
AnswerRe: ASP.NET "Overlay" Pin
Sathesh Sakthivel26-Aug-07 19:38
Sathesh Sakthivel26-Aug-07 19:38 
Questionclass in asp2.0 Pin
saravanan0526-Aug-07 19:31
saravanan0526-Aug-07 19:31 
AnswerRe: class in asp2.0 Pin
Sathesh Sakthivel26-Aug-07 19:37
Sathesh Sakthivel26-Aug-07 19:37 
GeneralRe: class in asp2.0 Pin
saravanan0526-Aug-07 20:08
saravanan0526-Aug-07 20:08 
AnswerRe: class in asp2.0 Pin
John-ph26-Aug-07 20:19
John-ph26-Aug-07 20:19 
Questionpost back event Pin
dipakapate26-Aug-07 18:19
dipakapate26-Aug-07 18:19 
AnswerRe: post back event Pin
Sathesh Sakthivel26-Aug-07 19:17
Sathesh Sakthivel26-Aug-07 19:17 
QuestionMultiview Pin
duo!@#26-Aug-07 17:59
duo!@#26-Aug-07 17:59 
AnswerRe: Multiview Pin
Urs Enzler26-Aug-07 20:36
Urs Enzler26-Aug-07 20:36 
QuestionHow to pass control to asp.net webservice Pin
Dot Net26-Aug-07 17:26
Dot Net26-Aug-07 17:26 

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.