Jump to content

Infopath forms

- - - - -

  • Please log in to reply
1 reply to this topic

#1
mayasmitha

mayasmitha

    Newbie

  • Members
  • PipPip
  • 13 posts
Hi,

I em working with Infopath Designer 2010. I have a form with fields Name(date type: string) and Score(data type :decimal(double)). I have created a web application which will download the infopath form(myFile) from the server and read the form data. I am able to get the form filed values lime below.

MemoryStream myInStream = new MemoryStream(myFile.OpenBinary());

XmlDocument myDoc = new XmlDocument();

myDoc.Load(myInStream);

XmlNode myRoot = myDoc.DocumentElement;

XmlNamespaceManager xmlNSManager = new XmlNamespaceManager(myDoc.NameTable);

xmlNSManager.AddNamespace("my", "http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-01-15T18:21:55");

XPathNavigator nav = myRoot.CreateNavigator();


XmlNodeList nodes = myDoc.GetElementsByTagName("my:Score");

foreach (XmlNode node in nodes)

{

Resonse.Write(node.InnerText.ToString()); //will return the value of the field Score

}

But can anyone tell me how can I get the data type of the field Score?

Regards,
Mayasmitha

#2
mayasmitha

mayasmitha

    Newbie

  • Members
  • PipPip
  • 13 posts
Thank you :) But can anyone help me how to get the data types of form fields using the above code?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users