Hi,
I am learning how to program InfoPath in VS.NET. I cannot modify a textbox's
text in C# code. I tried:
txtName.Text = "Alan";
But it doesn't compile. Perhaps InfoPath UI programming is totally different
from WinForms development. Could you give me some clue how to do that?
Thank you,
Alan
Henning Krause [MVP - Exhange] - 08 Jun 2005 06:05 GMT
Hello,
you don't have access to the UI at all (except for XDocument.UI.Alert and
such things). To modify content in textboxes you must modify the underlying
xml:
XDocument.DOM.SelectSingleNode("my:Fields/my:Text").text = "Lorem Ipsum";
Of course, you have to use a valid XPath expression...
Greetings,
Henning Krause [MVP - Exchange]
==========================
Visit my website: http://www.infinitec.de
Try my free Exchange Explorer: Mistaya
(http://www.infinitec.de/software/mistaya.aspx)
> Hi,
>
[quoted text clipped - 10 lines]
>
> Alan