S
Sayan Ghosh
Hi,
I have a challenge where I have to supply dynamic infopath forms to my
users. These forms will be *.xsn templates which would be opened by users
using Infopath 2007 client in their local machines. I have the following
questions:
1. I have a ASP.NET website. In this site, the form will be available at
some page for download (not a hosted scenario). Based on some querystring
parameters, the page will do a DB query and generate/embed the initial values
to be shown in this form. To me, it looks like I have to create an xml file
and put the data there. Then, I have to create an Infopath document
programmatically (I don’t have any idea how to do that) and bind the xml file
with this form template and then present it to the user for download.
a. Question 1: Is it possible to create an Infopath document
programmatically from ASP.NET codebehind? Does anyone have a sample for the
same?
b. Question 1: Is it possible to bind the above dynamic .xsn template to a
custom xmlDocument object also created by C# code? Does anyone have a sample
for the same? Will this xml file be present as an embedded secondary
datasource or a primary data source in the final template? Is it possible to
secure that data so that user cannot extract/view the xml?
2. Next, if the above is possible, can we have the ability to refresh these
data values from within the form by calling a Web Service method (may be on a
button click)? Can this Web Service URL be made configurable?
3. When we send a form by email, is it possible to email only one view? Is
it possible to pick up the list of recipients from a field in the form?
Any suggestions/code samples will be invaluable.
Regards,
Sayan
I have a challenge where I have to supply dynamic infopath forms to my
users. These forms will be *.xsn templates which would be opened by users
using Infopath 2007 client in their local machines. I have the following
questions:
1. I have a ASP.NET website. In this site, the form will be available at
some page for download (not a hosted scenario). Based on some querystring
parameters, the page will do a DB query and generate/embed the initial values
to be shown in this form. To me, it looks like I have to create an xml file
and put the data there. Then, I have to create an Infopath document
programmatically (I don’t have any idea how to do that) and bind the xml file
with this form template and then present it to the user for download.
a. Question 1: Is it possible to create an Infopath document
programmatically from ASP.NET codebehind? Does anyone have a sample for the
same?
b. Question 1: Is it possible to bind the above dynamic .xsn template to a
custom xmlDocument object also created by C# code? Does anyone have a sample
for the same? Will this xml file be present as an embedded secondary
datasource or a primary data source in the final template? Is it possible to
secure that data so that user cannot extract/view the xml?
2. Next, if the above is possible, can we have the ability to refresh these
data values from within the form by calling a Web Service method (may be on a
button click)? Can this Web Service URL be made configurable?
3. When we send a form by email, is it possible to email only one view? Is
it possible to pick up the list of recipients from a field in the form?
Any suggestions/code samples will be invaluable.
Regards,
Sayan