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

ASP.NET

 
AnswerRe: Asp.net, javascript : Textbox issue with chrome and firefox. pls help me out Pin
Parwej Ahamad2-Aug-13 7:07
professionalParwej Ahamad2-Aug-13 7:07 
AnswerRe: Asp.net, javascript : Textbox issue with chrome and firefox. pls help me out Pin
Dholakiya Ankit10-Sep-13 0:51
Dholakiya Ankit10-Sep-13 0:51 
QuestionDisplaying images using image controller in asp.net which was retrived from sql server database Pin
Rajeev Krishna1-Aug-13 6:12
Rajeev Krishna1-Aug-13 6:12 
AnswerRe: Displaying images using image controller in asp.net which was retrived from sql server database Pin
Rajeev Krishna2-Aug-13 1:35
Rajeev Krishna2-Aug-13 1:35 
AnswerRe: Displaying images using image controller in asp.net which was retrived from sql server database Pin
Dholakiya Ankit7-Aug-13 21:28
Dholakiya Ankit7-Aug-13 21:28 
QuestionGenerate PDF documents from a HTML page using ASP.NET Pin
GopalakrishnanPS31-Jul-13 21:12
GopalakrishnanPS31-Jul-13 21:12 
AnswerRe: Generate PDF documents from a HTML page using ASP.NET Pin
Parwej Ahamad31-Jul-13 21:50
professionalParwej Ahamad31-Jul-13 21:50 
AnswerRe: Generate PDF documents from a HTML page using ASP.NET Pin
Bernhard Hiller31-Jul-13 22:35
Bernhard Hiller31-Jul-13 22:35 
GeneralRe: Generate PDF documents from a HTML page using ASP.NET Pin
GopalakrishnanPS1-Aug-13 2:15
GopalakrishnanPS1-Aug-13 2:15 
GeneralRe: Generate PDF documents from a HTML page using ASP.NET Pin
Bernhard Hiller1-Aug-13 3:50
Bernhard Hiller1-Aug-13 3:50 
GeneralRe: Generate PDF documents from a HTML page using ASP.NET Pin
GopalakrishnanPS1-Aug-13 5:06
GopalakrishnanPS1-Aug-13 5:06 
QuestionManually handling ASP.NET sessions Pin
Desmond Lim31-Jul-13 15:32
Desmond Lim31-Jul-13 15:32 
Question3-layer application Pin
larsp77731-Jul-13 9:28
larsp77731-Jul-13 9:28 
SuggestionRe: 3-layer application Pin
Richard MacCutchan31-Jul-13 21:05
mveRichard MacCutchan31-Jul-13 21:05 
Questionxslt template for creating excel file with multiple worksheets Pin
kanniga31-Jul-13 2:01
kanniga31-Jul-13 2:01 
I have used the follwing code:
The first sheet has the dataset value.But the second shhet doesnt have any value.I dont knw where the second data will be added to the XML writer cod part.


protected void btnExport_Click(object sender, EventArgs e)
{

string procInfo = "type='text/xsl' href='" + "\\transform.xslt" + "'";//Processing info for XSLT
string curdate = DateTime.Now.ToString().Replace(":", "").Replace("/", "").Replace(" ", "");
//string FileName = curdate + "_" + "Details_test.xls";
string TempPath = Server.MapPath("../Uploads");
string XMLPath=TempPath+ "\\Details.xml"; //temp path to store the XML file
string XLSPath = TempPath + "\\Details.xls";//temp path to store the XLS file

//Write the dataset as XML file with some XSLT processing information
using (XmlTextWriter tw = new XmlTextWriter(XMLPath ,
null))
{
tw.Formatting = Formatting.Indented;
tw.Indentation = 10;
tw.WriteStartDocument();
DataSet ds = GetDetails1();
ds.Tables[0].TableName = "Detail1";
DataSet ds1 = GetDetails2();
ds1.Tables[0].TableName = "Detail2";
tw.WriteProcessingInstruction("xml-stylesheet", procInfo);
ds.WriteXml(tw);
//ds1.WriteXml(tw);
}


XmlDataDocument xmldoc = new XmlDataDocument();
xmldoc.Load(XMLPath);
XslCompiledTransform xsl = new XslCompiledTransform();
xsl.Load(Server.MapPath(".")+"\\transform.xslt");


using (XmlTextWriter tw = new XmlTextWriter(XLSPath, System.Text.Encoding.UTF8))
{
tw.Formatting = Formatting.Indented;
tw.Indentation = 3;
tw.WriteStartDocument();
xsl.Transform(xmldoc, null, tw);//Performa XSLT transformation.
}


//Streams the generated XLS file to the user
byte[] Buffer = null;
using (FileStream MyFileStream = new FileStream(XLSPath, FileMode.Open))
{
// Total bytes to read:
long size;
size = MyFileStream.Length;
Buffer = new byte[size];
MyFileStream.Read(Buffer, 0, int.Parse(MyFileStream.Length.ToString()));
}
Response.ContentType = "application/xls";
string header = "attachment; filename=" +"Details.xls";
Response.AddHeader("content-disposition", header);
Response.BinaryWrite(Buffer);
Response.Flush();
Response.End();

}
AnswerRe: xslt template for creating excel file with multiple worksheets Pin
kanniga1-Aug-13 0:45
kanniga1-Aug-13 0:45 
QuestionPrint to serial port printer from the browser (asp.net web app:) Pin
sk_ko30-Jul-13 15:26
sk_ko30-Jul-13 15:26 
AnswerRe: Print to serial port printer from the browser (asp.net web app:) Pin
Ron Beyer30-Jul-13 15:47
professionalRon Beyer30-Jul-13 15:47 
QuestionASP.NET CMS recommendation for a small website Pin
devenv.exe30-Jul-13 4:16
professionaldevenv.exe30-Jul-13 4:16 
AnswerRe: ASP.NET CMS recommendation for a small website Pin
Rahul Rajat Singh31-Jul-13 0:25
professionalRahul Rajat Singh31-Jul-13 0:25 
AnswerRe: ASP.NET CMS recommendation for a small website Pin
Jahanzaib Rahman1-Aug-13 21:05
Jahanzaib Rahman1-Aug-13 21:05 
AnswerRe: ASP.NET CMS recommendation for a small website Pin
Dusara Maulik12-Aug-13 9:40
Dusara Maulik12-Aug-13 9:40 
GeneralMessage Removed Pin
30-Jul-13 3:55
professionaldevenv.exe30-Jul-13 3:55 
QuestionAutomate OAuth2 Pin
y_chen30-Jul-13 3:12
y_chen30-Jul-13 3:12 
Questiontreeview in asp.net Pin
RajivRanjan Yadav30-Jul-13 2:24
RajivRanjan Yadav30-Jul-13 2:24 

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.