.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problem Resolving More Than One Contact Selector

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :SharePoint
On a Forms Services form I have 3 contact selectors.  The form connects to SharePoint and creates an item in SharePoint based on code behind. The problem is that only one of the contact selectors resolves automatically.  If the user clicks into the contact selector field manually and tabs off the field then it will resolve but I need to automatically resolve all contact selectors before the user clicks a button on the form to add the items to SharePoint list. If the user does not click into the contact selector field then the username in the field does not become underlined (i.e. resolved) as a valid username. When debugging I can see that the XML behind the form is as follows: <my:AssignedToPersons> <my:Person> <my:DisplayName>Bloggs, John</my:DisplayName> <my:AccountId>DOMAIN\jbloggs</my:AccountId> <my:AccountType>User</my:AccountType> </my:Person> </my:AssignedToPersons> <my:ManagerPersons> <my:Person> <my:DisplayName>Bloggs, Bill</my:DisplayName> <my:AccountId></my:AccountId> <my:AccountType></my:AccountType> </my:Person> </my:ManagerPersons> <my:ManagerPersons> <my:Person> <my:DisplayName>Bloggs, Jim</my:DisplayName> <my:AccountId></my:AccountId> <my:AccountType></my:AccountType> </my:Person&

View Complete Post

More Related Resource Links

Contact Selector - Form tab index is lost after selector resolves names on blur


I'm working with an InfoPath2007 form developed to be filled-out through the browser on a SharePoint 2007 site, and I'm testing using Internet Explorer 7.  It's a straight-forward form, with a number of text fields and two Contact Selector controls.

The issue I'm encountering is with the Contact Selector control, where if the actor only enters a partial name into the text-field and then TABs away from the control the form will perform its auto-postback to look-up and resolve the partial name (showing the name resolution dialog is necessary), and afterward the actor's cursor is focused on the next field in the form.  The actor can type text into the focused field, but any subsequent pressing of the TAB key returns the actor's focus to the browser's ADDRESS bar, which is incorrect as it should proceed to the next field in the form.  I understand that the Contact Selector needs to perform its postback to perform the name resolution (so that there is no way through the InfoPath form designer to disable postbacks for the control), but why does the browser not know how to continue the TAB order of the fields on the form even when a field has focus?

Automatically populating Contact Selector not working in Form Services

Hi,I'm currently working on a form where i wan't to automatically populate a contact selector control with a users manager. I've got the managers userid, called the ResolvePrincipal webservice provided by sharpoint, and set all the values in the contact selector with the correct values. When previewing it works perfectly however when i move the form to Form Services it won't work.I've tried setting it via rules: i.e. on the change of a textbox write the manager values to the contact selector.I've tried setting the default values of the contact selector to fields where i write the manager values.I've tried setting it through code i.e. SelectSingleNode() and SetValue() for each of the fields in the contact selector.All of which work fine in preview mode but will not work in Form Services, UNLESS the contact selector already has a user in it. So if the contact selector is blank it won't work, however as soon as i manually select a user then try using any of the previously mentioned methods of setting the control it works. While using code i get a nullreferenceexception which leads me to think that possibly when theres no user in the control the xml nodes representing the AccountId, DisplayName, AccountType don't exit???? TO throw another spanner in the works, on the very odd occasion it will work in Form Services as expected, after celebrating and trying again it returns

Contact Selector Failed in MOSS Workflow Modification Infopath Form

Hi,   In my proof of concept Moss 2007 WF, I tested an Infopath modification form successfully.  Then the contact selector ActiveX control was added but it failed to open using the modification link of the workflow page.  In a different form for the WF initiation, I similarly created two CS controls and it worked there.  A snippet of the MOSS error is below   Object reference not set to an instance of an object.   at Microsoft.Office.InfoPath.Server.Controls.ContactPicker.RenderClientViewDataLeafContent(XPathNavigator context, IRenderContext renderContext, ControlViewData controlViewData, ScriptWriter writer)    at Microsoft.Office.InfoPath.Server.Controls.LeafControl.RenderClientViewDataContent(XPathNavigator context, IRenderContext renderContext, ScriptWriter writer)    at Microsoft.Office.InfoPath.Server.Controls.BaseControl.RenderClientViewData(XPathNavigator context, IRenderContext renderContext, ScriptWriter writer)    at Microsoft.Office.InfoPath.Server.Controls.ContainerControl.RenderClientViewDataContent(XPathNavigator context, IRenderContext renderContext, ScriptWriter writer)    at Microsoft.Office.InfoPath.Server.Controls.BaseControl.RenderClientViewData(XPathNavigator context, IRenderContext renderContext, ScriptWriter writer)    at Microsoft.Office.InfoPath.Server.Controls.CollectionControl.RenderClientViewDataContent(XPathNavigator context, IRenderContext rend

Programmatically help with Contact Selector


Hi Guys , i need a C# Method that inputs the AccountID of the Contact selector and Returns it's DisplayName please help me to do this

Thanks Meda

Set Contact selector rules in InfoPath when using DIP from SharePoint


I created a custom content type of type document in WSS 3.0. I created column called "person" of type "People or Group ". So when I create a new document in SharePoint, there is a contact selector (people picker) in document information panel . But I would like to use InfoPath to edit the contact selector in this way: When a person is picked in the contact selector, another field (also custom column from my content type) will be changed according to the person I picked. I hope it is clear :-)

But in InfoPath when I right click the contact selector, there is no Rules... option, even no Data validation option etc.

What can I do?

Thanks for any suggestions.

Contact selector InfoPath forms services


I want to filter users displayed in contact selector by group.

So, i don't want to display all users but only users in a special group

problem in contact page



I have a problem with this link:

I am just trying a simple email sending which should give an alert with an error if error ocurres or a sent message if it was successfull but it's not doing anyting!

it's just refreshin the page with a new funny style!

here is the code I am using


        public static bool is_valid_email(string user_email)
            string strRegex = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +
                  @"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +
            Regex re = new Regex(strRegex);
            if (re.IsMatch(user_email))
                return (true);
                return (false);

        protected void Page_Load(object sender, EventArgs e)

        private void MessageBox(string msg)
            Response.Write("<script language='javaScript'>window.alert('" + msg.Replace("'", "\\'") + "')</script>");

            // Page.Controls.Add(new LiteralControl("<script language='javaS

Checks on Contact Selector

Hi I want to create check on contact selector. Like if there is no value in contact selector then change the view. Can any body help me?

SharePoint Designer workflow task - problem with multiple users selector in InfoPath form




I have got an issue with InfoPath form generated for my SharePoint Designer workflow task. There is a multiple users selector that requests users from a task assignee. The problem is that only the first user entered got saved.


I am using SharePoint 2010 Standard Server (release). Steps to reproduce are the following:

Infopath: Contact selector field



I am designing an infopath which is connected to an Access DB.

I need to have a "Contact selector" field in my Infopath, is this still possible without having a sharepoint server to connect to?

If yes, how can this be achieved?

Contact selector and custom xml schema



Because I want to reuse some parts, I build my forms with several "subs" xsd. Within these xsd files, I've defined at several places a structure to hold the contact selector internal data (DisplayName, AccoundType and AccountId within a repeatable group).

When I want to bind the contact selector to the sub schema element, it works in design, but not at runtime.

In the CS properies, It's written that the CS use the schema of the current form. Does that means I'm condemned to put all my contact selector element store in the top level schema, the form's one ?

Is there any way to "reuse" the contact schema ? I'm building serialization object behind the scene, and I don't wan't to have People1 People2, PeopleX for each form I have.


I'd appreciate any advice to unscramble my mind.



Paying back the community for its help by writing articles :
Have a Nice Day.Net Blog

Contact Selector in infopath (view Email also) sharepoint/infopath 2007


hi ,

first i want to know what is the benifit of contact Selector.

what is the best method to configure this.

and i want to view the Email(WorkEmail) with DisplayName,AccountId,AccountType.



Thanks and Regards Er.Pradipta Nayak

assembly resolving problem



I have a project that references TXTextControl.dll (available at http://www.textcontrol.com/en_US/downloads/trials/ TX Text Control .NET for Windows Forms). Originally, the license.licx contains:

TXTextControl.TextControl, TXTextControl, Version=11.0.300.500, Culture=neutral, PublicKeyToken=6b83fe9a75cfb638

Since I download newer version of TXTextControl.dll, I change license.licx to:

TXTextControl.TextControl, TXTextControl, Version=16.0.900.500, Culture=neutral, PublicKeyToken=6b83fe9a75cfb638

(new strong name is found under properties of dll and PublicKeyToken is found to be same as old version through sn.exe)

But strangely, it still gives error:

Error    1    Unable to resolve type 'TXTextControl.TextControl, TXTextControl,  Culture=neutral, PublicKeyToken=6b83fe9a75cfb638'

What is the problem? I need help. Thanks.


Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

Regrading Sharpoint 2010 problem and solutions

We can write your question and problem on this blogger.you get ans.use.

This sharpoint 2010 problem solving threads

Hi friend,

you can use this thread to solving problem and solutions.

Virtual Path Problem


 I get the following error on last line below (working on remote host): 'E:\web\sfcascom\ls_admin/uploads/images/001.JPG' is not a valid virtual path,

Note that the slashes go in different directions

I've tried a number of things but nothing seems to work. Thanks-


Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Imaging
Imports System.Web.UI.WebControls

Imports System.Drawing.Imaging.ImageCodecInfo
Partial Class Protected_imageupload
    Inherits System.Web.UI.Page
    Private Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
        ' Initialize variables
        Dim sSavePath As String
        Dim sThumbExtension As String
        Dim intThumbWidth As Integer
        Dim intThumbHeight As Integer
        Dim sFilename As String = ""
        ' Set constant values
        'sSavePath = "images/"
        sSavePath = Server.MapPath("~/") + "ls_admin/uploads/images/"

        sThumbExtension = "_thumb"
        intThumbWidth = 160
        intThumbHeight = 120

        ' If file field isn?t empty
        If FilUpload.PostedFile IsNot Nothing Then
            ' Check file size (mustn?t be 0)
            Dim myFile As Http
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend