How to determine XPath of a User Control in InfoPath 2007

When I was doing customization in InfoPath, I had some difficulties to find the XPath of user controls, after spending several minutes I found a way to determine the XPath in InfoPath 2007. I just wanted to share this in my blog, because there is no any straight forward answer in the web.

Step 1: Create a blank InfoPath template and add an User Control from the Controls Design Tasks (On your right hand side of the InfoPath). In this example I have added two Text Boxes and a Button and re-named them.

Step 2: Select the user control and click the Data Source in the Design Tasks.

Step 3: Now, you can see the selected control’s highlighted name in the Drop Down List.

Step 4: Click the Drop Down arrow and select the Copy XPath in the list.

Step 5: That’s all, you can use the XPath in your code. 🙂

Thanks, R./

Advertisement
  1. Learn Sharepoint 2010

Please leave a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: