|
Not like that.
Instead of,
Response.WriteFile(file.FullName);
Use,
Response.Write(xmlStream);
|
|
|
|
|
hi,
what i wrote is
public void DownloadXML(string xmlDoc, string fileName)
{
Response.ClearContent();
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xml", fileName));
Response.Charset = "";
Response.ContentType = "application/octet-stream";
//StringWriter stringWrite = new StringWriter();
//HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
//grdGridView.RenderControl(htmlWrite);
UTF8Encoding encoding = new UTF8Encoding();
Byte[] byteArray = encoding.GetBytes(xmlDoc);
Response.Write(byteArray);
Response.End();
}
it's not working
alex
|
|
|
|
|
just use the href and give the server location of the file.
mahendra
|
|
|
|
|
Hi,
That's not the way i expect..because i don't have specific file in location...this xml document is created dynamically at runtime say, when the user clicks download button.....
alex
|
|
|
|
|
hi,
i had used two listbox controls and button.when listbox1 has some data while clicking the button it shows in the listbox2 and also listbox can select the selectionmode is multiple. only once the items are selected
baboo
|
|
|
|
|
by using selectedindex or selectedvalue you can select the value and can transfer the values to and from.
|
|
|
|
|
you can do it at server side and client side
Client side :- Use javascript for that
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi All,
I am very new to this WYSWYG editor,I downloaded this.i got some script files.and i added to my Solution explorer.Now in my webpage i got the editor.My requirement is to post some articles through this editor.I can able to write the article in this editor.But my Question is in C# code behind page how can i get the data which is there in the editor.I m trying this from last couple of days.But i am not able to get it.Plz help me by giving any sample code who are working on this editor.
Thanks in advance.
Krishna Prasad
|
|
|
|
|
Call the namespace.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Call the namespace?
Aren't namespaces just that, a 'space' with a name that holds other namespaces and classes, etc, with no inherent functionality of their own?
Can you post a snippet of code showing an example of how one can 'call a namespace' please Satips. I am intrigued.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
Hi friends,
I am working in an existing project which has multiple projects as modules (Single project under single solution). These projects are not organized as seperate projects.
Now We are in the situation to split each modules into a projects under a single solution. We are using references which are used commonly by all the modules. But when we split it into projects.
To refer the references,
* Should we have to refer it in each projects? Or
*Is there any way to keep all the common references in a single place (common bin folder if possible)?
* Are any other better solutions.
Thanks in advance
|
|
|
|
|
you can keep all the common modules as DLL in Gac.
|
|
|
|
|
Thanks for replying...
How to do that? I am new to use GAC. Can you point me to any source?
|
|
|
|
|
there are thre steps to register dll in GAC
1. create strong key using sn -k keyname
2. then assign the key to project by right click on project and then use Sign Assembly option. you have to browse the strong key.
3.install the assembly in GAC using GACUTIL
gacutil/i Option.
Mahendra
|
|
|
|
|
Should I have to do it for each project in that solution??
|
|
|
|
|
|
OK... Let me try first...
Thank you very much...
|
|
|
|
|
HI,
Friends i need your help...i am using asp.net gridview with Ajax Hovermenu control..
but i couldn't able to make it properly...what i get is the panel is always placed in the top corner..
i want the panel to be shown corresponding to each row...please anybody help me...
thanks
Alex.
|
|
|
|
|
You need to set left and top property
try this script
document.getElementById('panelId').style.left=event.clientX;
document.getElementById('panelId').style.top=event.clientY;
set postion="absolute" of Panel
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
hi,
One another doubt..please help me ...
If a user clicks download button one xml document is created and to be download..i have the code for getting the xml document but don't have the code for download that file ..if some body helps me it's great....
remeber that i don't have any specific xml file in my server, that file is created dynamically when the user clicks download button.
regards
alex.
|
|
|
|
|
post your code for XML document
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
else if (e.CommandName == "Download")
{
string xml = ParseXML(dr.DamageReportXML.ToString());
if (xml != "")
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(xml);
DownloadXML(xmlDoc, dr.Id.ToString());
}
}
}
private string ParseXML(string xml)
{
String xslPath = Server.MapPath(@"..\\xslts\\downloadXSL.xsl");
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
if (doc != null)
{
XslCompiledTransform transform = new XslCompiledTransform();
StringWriter sw = new StringWriter();
//Load the xsl stylesheet
transform.Load(xslPath);
transform.Transform(doc, null, sw);
return sw.ToString();
}
return "";
}
|
|
|
|
|
Create new .XML file dynamically
write xml content in the file
save file in the server
download it.
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
hi,
Is there any other solutions because it's not good to save everytime and delete it, in my case
regards
alex.
|
|
|
|
|
I think NO
bEST rEGARD
pATHAN
---------------------------------------------------
|
|
|
|