Display Site Name - InfoPath Dev Sign in | Join | Help in General InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » General » Display Site Name Display Site Name Last post 11-13-2008 05:09 AM by swathip. 1 replies. Page 1 of 1 (2 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 11-13-2008 03:12 AM amitpawar09 Joined on 11-13-2008 Posts 1 Display Site Name Reply Contact Hi All, I'm very new to InfoPath forms. I want to display name of the site from which the form is invoked. Any pointers would be a great help. Thanks Amit 11-13-2008 05:09 AM In reply to swathip Joined on 10-30-2007 India Posts 487 Re: Display Site Name Mark as Not AnswerMark as Answer... Reply Contact Hi, Use the following code lines to get the site name. Note: This code works if the url is in the form of http://<servername>/<sitename>/.... Ex: http://server3/test/test1/Forms/template.xsn We will get the value ‘test’ if we use the following code lines. string url = thisXDocument.Solution.URI; url = ((url.Remove(0, url.Substring(0, url.IndexOf("//") + 2).Length)).Remove(0, url.Substring(0, url.IndexOf("/") + 3).Length)).Substring(0, url.IndexOf("/") - 1); Swathipwww.ggktech.com Page 1 of 1 (2 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
Hi All,
I'm very new to InfoPath forms.
I want to display name of the site from which the form is invoked.
Any pointers would be a great help.
Thanks
Amit
string url = thisXDocument.Solution.URI;