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

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

Unable to get all the values from a field

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Am reading an XML from web service and storing in  a dataset. 
then in write to a DataTable as follows

 DataTable dtResult1 = dsSearch.Tables["RESULTSET"];    
 DataTable dtHIT = dsSearch.Tables["HIT"];     
 DataTable dtField = dsSearch.Tables["FIELD"]; 

The issue  is  in the DataTable dtField i can only see 3 columns FieldID,Name,HIT_ID

The corresponding values in the dataTable looks like this for the corresponding fileds


I am unable to get the Field Name values 1,8799f4646b6ed9acde142581a84f75a6 ,234B5F5F-F247-4EB6-9E39-A7B64C7FE1BD,Yes...etc

What would be the cause for this...Any Help

Below is the structure of the XML-

- <HIT NO="1" RANK="2955" SITEID="0" MOREHITS="0" FCOCOUNT="0"> 
<FIELD NAME="rank">1</FIELD> 
<FIELD NAME="internalid">8799f4646b6ed9acde142581a84f75a6 </FIELD> 
<FIELD NAME="contentid">234B5F5F-F247-4EB6-9E39-A7B64C7FE1BD</FIELD> 
<FIELD NAME="contentids" /> 
<FIELD NAME="collection&

View Complete Post

More Related Resource Links

How do you create a custom BDC data field that allows for multiple selected values?

I need help creating a custom data field using the BDC column as a base.  We need to allow for multiple selected values instead of just a single one.  I can't find anything on the net which shows how to do this.

How to pre-populate field values of ListB from ListA


I want to know if there is an easy way to the pre-populate field values to ListB from ListA. 

In ListA I have ColumnA, ColumnB and ColumnC.  In ListB, I have Column1, Column2 and Column3.

When I add a new item in ListB, Column1 is a lookup field tied to ColumnA.  So, if I select a value from the lookup list, I want it to automatically populate ColumnB value to Column2 and ColumnC value to Column3.  Can this be done without programming?

Problem with CQWP "There is a problem with one or more of the field values below"

Hi, I'm trying out the content query webpart combined with content types. First I created a new site collection. In this site collection, these are the steps I did: - I enabled "SharePoint Server Publishing Infrastructure" feature at the site collection level - I enabled "SharePoint Server Publishing" feature at the site level - I created a new site column "Is Meat Eater", which is a yes/no field and added this to a new custom group called "Zoo" - I created a new content type called "Zoo Animal" that inherits from "Item" in category "List", and added this to a new custom group called "Zoo" - I added my site column "Is Meat Eater" to this content type (so now I have Title + Is Meat Eater) - I created a new custom list called "SharePoint Zoo" - I enabled content types on this list - I added "Zoo Animal" from the existing content types - I removed the default content type "Item" from the list (so now only 1 content type left, my own) - I added a few animals in the list - I added a content query web part on the homepage - As source I chose "Show items from all sites in this site collection" - As List Type I chose "custom list" - As Content Type Group I chose "Zoo" - As Content Type I chose "Zoo Animal" - I hit apply at

How to filter a List View by multiple values for one filter field?

Hi, I need to create a dynamically created link to a List View with a filter on one field, but with multiple values. Example: http://<server>/Lists/<list>/Allitems.aspx?FilterField1=Name&FilterValue1=John/Jack/Jonas which should give me all items where Name equals John, Jack or Jonas. Is this even possible?

User Specific Values for a Drop Down "Choice" Field

I would like to create a drop down field which has some fields disabled or not visible based on the user logged in.  Is this possible?

Unable to filter the "E-mail To" field in email enabled document library

Hi, We have setup a few email enabled docuement libraries to store emails relating to project work. Is there a way to make the "E-mail To" field in the library be filtered? It is greyed out and doesnt give you the option. The "E-mail From" and "E-mail Subject" are able to have a filter applied to them but for some reason the "E-mail To" field wont let you filter the content. The probelm is that there are over 500 files in the library and the easiest way to find messages is to be able ot filter this column in the library if it is at all possible.

HELP! Setting field values - CONVERTING ARTEMIS SQL TO T-SQL 2005

I have the following statement written in ARTEMIS (an ancient SQL project management product): What would be an equivalent code syntax within SQL Server 2005's T-SQL? I am new to Sql Server and have not been able to understand the online help... set in tishead use stmeng1 set if xshopord exi in stmeng1 xbusunit=busunit if busunit present xcustnam=custname if custname present xopnlt=openlett if openlett pre xengrrel=engrrele if engrrele pre xlineup=lineup if lineup pre xlinent=lineupne if lineupne pre xmfgship=mfgship if mfgship pre xsubmodl= modelcod if modelcod pre xmpl=mpl if mpl pre xcwantdt=custwant if custwant pre end end

Unable to change textbox values after manual assignment



In my webapp, I have a DropDownList_OnSelectedIndexChanged that assigns values for a number of <asp:textbox'es depending on which entry is selected...

       public void ModifyProjectIDBox_SelectedIndexChanged(object sender, EventArgs e)


            int tempJobID = Get_Selected_Report();

            dbCommandString = "SELECT Name, Address, State, Awarded, StartDate, EndDate, HomeLocal FROM dbo.ProjectInfo WHERE ProjID = " + tempJobID;

            dbComm.CommandText = dbCommandString;


            dbReader = dbComm.ExecuteReader();


                ModifyProjectNameBox.Text = dbReader[0].ToString();


            ModifyProjectAddrBox.Text = dbReader[1].ToString();

            ModifyProjectStateBox.Text = dbReader[2].ToString();


How to add values of a fields (decimal numbers) to another field?

I have bunch of decimal fields on an InfoPath form and I need to add them up into a totals field when the form is saved.  How can I do that ?

Unable to set "column settings" of Yes/No (Check Box) values "Required, Optional, Hidden" of content


Hi, SharePoint 2010 and I have created a number of site columns of type Yes/No (check box). I have created a number of content types and used these column types but when I try to change the column setting within the content type to "Required, Optional or Hidden" I am unable as the settings are greyed out and I am unable to change them.

Even in the Parent content type I am unable to change this particular type of column value so it isn't an inheritence setting as it's the parent content type. Am I doing something wrong?  

Note - I am recreating a list from a SharePoint 2007 site and I am able to change the setting here, have i configured this incorrectly or was this something that could be done in SP 2007 but not SP 2010.

Thanks fo any help.

Multiple values in field as parameter


Hello, I want to use values from a field in a sql server table as paramters in my tsql query. The problem is that the data in the field is as follows:

1. There may be only one value, such as '6000'.

2. There may be more than one value, seperated by |, such as '6000'|'6001' This would mean all values that are equal to 6000 or 6001

3. There may be more than one value, seperated by .., such as '6000'..'7000' This would mean all values that are from 6000 through 7000

Any help is appreciated. Thank you.


Binding values to text box field in xslt page


Hi i have the SQLite data table which i have coverted to an xml page. for this xml page i'm using xslt to display page. in this xslt page i have a table similar to that Sqlite table but in each <td></td> i have inserted a text box so that it can be editable and updatable like

<td> <input id="TextBoxlocalMarkup" type="text" class="text1" disabled="disabled"></input> </td>

<td> <input id="TextBoxLocalSurcharge" type="text" class="text1" disabled="disabled"/> </td> 

i want to display the values in these text boxes... How can i do that in xslt for-each loop

How to assign values to workflow task person or group custom field?

Using visual studio 2008, in createTask_MethodInvoking, I have the following code. RequestFields has the values from the InfoPath form. ApprovingPersons is a person or group field, added to the task list by my custom task content type. I checked the task list associated with the workflow and I see the custom field.

SPUser user;
SPFieldUserValueCollection fuvc = new SPFieldUserValueCollection();
foreach (Contact person in RequestFields.Persons)
      user = workflowProperties.Web.EnsureUser(person.LoginName);
      fuvc.Add(new SPFieldUserValue(workflowProperties.Web, user.ID, user.Name));

// this is the line causing problem, I believe
PreApprovalTask_TaskProperties.ExtendedProperties["ApprovingPersons"] = fuvc;

I got the following error message:

at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] argument



Why is my csv import truncating my values in only 1 field


Not that it should matter.. the 2nd value in the csv is an IP address.. its in the file as an example), but gets read as 192.1687, if the file is setup as delimited in the connection string, does that have any restraints on the data being read?

When i open the file in notepad, the comma is at the end of the IP address, when i open it in excel it is in its own column.. so what could be causing this?

Because of this issue with the truncation, that is what is causing the primary key issue.. because there are other values that are similar like these:

because if the issue, it passes each one of those as 192.1687


Here is the table structure, in case it helps resolve this issue..


[id] [int] NOT NULL,

[IpAddress] [varchar](16) NOT NULL,

[MacAddress] [varchar](16) NULL,

[APTypeId] [int] NOT NULL,

[APUser] [varchar](256) NULL,

[APPass] [varchar](128) NULL,

[APLocation] [varchar](20) NULL,

[APFreq] [varchar](50) NOT NULL,

[APBand] [varchar](50) NOT NULL,

Setting Task Field Values in Custom .aspx Edit Form and accessing through ExtendedProperties


Since we're using WSS 3.0 and not MOSS 2007, we have to create and use ASP forms for any custom Workflow Task Edit pages instead of being able to use InfoPath forms (which would be nice...maybe some day we'll step up to MOSS). The custom Workflow Edit Pages are used for custom Task Content Types that we create so that our Workflow Tasks can have additional fields beyond the standard Workflow Task fields. Once you've collected the values for the Task fields from the user on the ASP Workflow Task Edit form, the typical procedure is to create a hashtable and fill the hashtable with key/value pairs that represent the names of your Task fields and their associated values, as such:

// This function is called when the user clicks the Save/Submit button
// on the Custom Task Edit ASP form
public void btnSubmit_Click(object sender, EventArgs e)
  // Create a hashtable that will be used to update the values of task fields
  Hashtable taskHash = new Hashtable();
  // For each field, create two values in the hashtable. If the field name 
  // matches a field in the Task content type, the field name will not be 
  // searchable as a key within the ExtendedProperties hashtable. So 
  // create a second field that is a duplicate of the first but having a 
  // name that doesn't exactly match an existing field in the Task 
  // content type. That way it will be a searchable ke

Custom Form does not save values if field validation occurred



I have a custom New form that I am having problems with.  If a user inputs all fields, and the form validation doesn't catch any problems, then the list item is saved with no problems.  


If one of the form fields finds a problem such as a required field that wasn't entered or an invalid name in the people picker, then after the user corrects the problem and presses save the list item will get saved without the correct values from the form fields.  The form fields still display the correct information before pressing save, but the list item that was saved does not have the same values as the form fields.


It seems that SharePoint:FormField are fine, but things such as SharePointBig SmileVDropDownList will display the data after a form error, but will no longer keep the form data and therefore it doesn't get saved.


Has anyone else had this problem?  If so then have you found a fix?

This field can have no more than 255 characters error - mutiple values


I have a doc lib.
I have a list i used to store categories.
Then i have a lookup from my doc lib that uses this category colum and i nade it multiple values.
When users try to upload ths docs and add mutiple records using the multiple values they get the error.

This field can have no more than 255 characters.
Any ideas on how i can fix this?

Thanks in Advance

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