Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / June 2005

Tip: Looking for answers? Try searching our database.

Programming Infopath in VS.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
A.M - 08 Jun 2005 02:58 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.