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 / July 2007

Tip: Looking for answers? Try searching our database.

How to display values in infopath

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arthur Pendragon - 16 May 2007 03:13 GMT
Hi all,

I'm using InfoPath 2007 and I'm very new at it. I'm not sure how to do
this so I'm asking you guys.

I want to display a simple text ("Text") to a textbox in my form. The
textbox's ID is userName. I don't know the syntax that I should use to
display the text in the textbox. If in VB .NET it is 'TextboxName.Text
= "Text" ', what would it be in InfoPath?

I hope you could help me on this.

Thanks so much and more power.

Regards,
Arthur
Sudhir Kesharwani - 16 May 2007 06:40 GMT
if you are using Visual Studion Tools for Office (VSTO) then you can
write following code to access the xml node for your text box...

XPathNavigator root = this.MainDataSource.CreateNavigator();

Now access the property value using following statement.
root.SelectSingleNode("/my:myFields/
my:userName",this.NamespaceManager).Value) = "AnyValue";

On May 16, 7:13 am, Arthur Pendragon
<arthur.pendragonofcame...@gmail.com> wrote:
> Hi all,
>
[quoted text clipped - 12 lines]
> Regards,
> Arthur
K.Ramana Reddy - 03 Jul 2007 08:54 GMT
Hi,

First you need to get the textbox reference using xpath. see below.
string name = XDocument.DOM.selectSingleNode("Xpath of your textbox")

then
name.text="enter text"
or

XDocument.DOM.selectSingleNode("/my:myFields/my:field1").text="enter text"

I hope this will help for you.

Signature

k.Ramana Reddy
http://www.autonomysystems.com

> if you are using Visual Studion Tools for Office (VSTO) then you can
> write following code to access the xml node for your text box...
[quoted text clipped - 23 lines]
> > Regards,
> > Arthur
 
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.