473,394 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Download an xml infopath form from an web page

I'm building a aspx web page with a button control.
When the button is clicked the server build an xml string containg the
directive to be opened with infopath.
When the client receive the file an error occured.

The strange is that if a save the file locally, open with notepad and save
it again without any modification, the file is correctlu opened with infopath.

Any suggestion?

Here is the code ...
private void Button1_Click(object sender, System.EventArgs e)
{
Response.AddHeader("Content-Disposition", "attachment;filename=Form1.xml");
//Response.AddHeader("Content-Transfer-Encoding", "binary");
Response.ContentType = "application/ms-infopath.xml; charset=utf-16";

Response.BinaryWrite(StringToUTF16ByteArray(outStr ing));
Response.End();
Response.Flush();
Response.Close();
}

here is the first line of the file ...
<?xml version="1.0" encoding="UTF-16"?>
<?mso-infoPathSolution solutionVersion="1.0.0.31" productVersion="11.0.6565"
PIVersion="1.0.0.0"
href="file:///C:\Progetti\INPS\Sources\Inps.Informa.Redazione\In ps.Informa.Redazione.Form\bin\Debug\Inps.Informa.R edazione.Form.xsn"
name="urn:schemas-microsoft-com:office:infopath:Inps_002E_Informa_002E_Redazio ne_002E_Form:-myXSD-2005-11-10T10-16-37" language="en-us" ?>
<?mso-application progid="InfoPath.Document"?>
<Root xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://intermedio.data.inpsinforma.product.inps.com"><Doc umento><Sezioni><Sezione..........

Nov 19 '05 #1
0 1230

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sven Steinacker | last post by:
Hi, XSLT files generated by Microsoft InfoPath applied to an applicable XML file produces quite decent HTML presentations. At least with Mozilla and, of course, IE 6.0 the results look the same...
4
by: MJ | last post by:
A question for InfoPath and ASP.NET experts: What do you think about the future of InfoPath and ASP.NET WebForms? Is InfoPath 12 going to replace ASP.NET WebForms? If not, in which types of...
3
by: Jeff Richardson | last post by:
This is a repost from the InfoPath news group. Hi, I am writing a SharePoint application that works with InfoPath forms. When a user submits a completed InfoPath form to a forms library my code...
0
by: Milan | last post by:
I have a dataset that has DBNull in certain columns, now when I write out this one to XML, I only get the columns as elements that do have data in it. However I do need also the empty colums as empty...
0
by: =?Utf-8?B?Q2hhcmxlcyBTaW1wc29u?= | last post by:
Hello I've tried in the InfoPath groups but no luck yet. Here is my situation: All computers are on an Active Directory domain in the company. I have an Infopath form stored on the network...
6
by: | last post by:
Can I have this function? When a user click on a link, my ASP page generates a text file call test.txt containing a string of "This ia s test msg.", and then a download dialogue appears. Any...
0
by: delirio | last post by:
Hi, I have an XML Schema containing inherited complex types, and xs:elements using @type of the top complex type, meaning, any child complex type can be an instance of that element by declaring...
0
by: steve | last post by:
I have an InfoPath form that needs to update an Access database. I'm using VB, in Visual Studio. So far i can't even open it: the database is on my hard drive, and no password is set. The...
0
by: Anni | last post by:
Hi, Can anyone please tell me how do I give same namespace for different infopath forms.? I have an XML formed by an infopath form, the XML is : <?mso-infoPathSolution...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.