.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

Inserting List Item values from a Visual web part

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :SharePoint
Hi Geeks, I am struck here with one situation that is: 1) I created a enquiry list. 2) Then I created a visual web part it contains the same fields as enquiry list  as textboxes for entry. If any body enters the data and click submit. Those data must be reflected into the enquiry list. Please enlighten me how can I do this.   Thanking you.

View Complete Post

More Related Resource Links

Adding a list item that populates a particular part of a page

I am trying to create a list view in sharepoint designer that when you enter a list value it populates the right part of the page. Background - I am creating a list for a marketing newsletter that when you fill out the list form it will populate the marketing newsletter on page. its to save recreating it every month. the list has drop downs for addition and department and the data is inserted on the page. thanksSharepoint Customiser

how to get values of list item being entered in ItemAdding event handler?

Hi,          i am trying to get the values being entered in a listitem in the ItemAdding eventhandler as follows, but it doesnt work. public override void ItemAdding(SPItemEventProperties properties)         {             base.ItemAdding(properties);             SPSite CurrentSite = new SPSite("http://mm-moss/np/");             SPWeb CurrentWeb = properties.OpenWeb();             SPList CurrentList = CurrentWeb.Lists[properties.ListId];             string vehicleNo = CurrentList.Items[CurrentList.Items.Count - 1]["Vehicle No"].ToString();             string  name=CurrentList.Items[CurrentList.Items.Count-1]["Name"].ToString(); } when i debug i cant get hold of the VehicleNo value. canyone help me in getting the values of the list item being entered? Thank you all.

Updating list item values in SharePoint Designer using code

Is it possible to programmatically modify the SharePoint objects using SharePoint Designer Object Model. By that I mean coding in SharePoint Designer (not Visual Studio). For example, can we access the list items of a list programmatically and change their values? I can do all this in Visual Studio using SharePoint Object Model but I don’t find a way of achieving this by using programming in SharePoint Designer. I searched through http://msdn.microsoft.com/en-us/library/bb208639(office.12).aspx but no success. If the answer is yes. Can someone please give example(s) or point to some articles etc? Thanks in advance.

Programtically Inserting Item into a List that has BDC fields?


We have a list with a field that is defined as Business Data from our BDC.   When we create a new item for the list using the UI, we use the UI to do a search for the record in the BDC (SQL Server) which returns the associated record and fields.

We would like to do this programatically.  We can create the list item and add it but what is necessary to insert a new item into the list from C# and automatically perform the lookup on the BDC field and populating its respective fields in the list?



Making part of a list item private



Can anybody tell me if it is possible to make part of a list item private? For instance say I have a list of client details, their name, ID and product should be viewable by everyone however their date of birth and address should only be available to a certain few.


Inserting Values in My Sharepoint list through Asp.net website


I have recently switched over SharePoint 2010 it seems very flexible and easy..

I had a task assigned

1)I have to simply create custom list for feed back  in share point 2010 which i had created
2) I had to create Asp.net website having a simple feedback form that takes the feedback input from the user  (i had done this using VS2008)

The above two task are accomplished... Now What remaining is ...

3) now I  had to insert values in that SharePoint feedback list from my Asp.net site as i click the button it show a message feedback submitted successfully and the data from my website should be inserted in my SharePoint feedback list

i can use web part? if yes can anyone guide me how?? but this is my 2nd option 

 the 1st priority is the  prim

LINQ to SQL - Validating if item is in Database, but if item is not items not inserting into databas



I am new to this, so bear with me.  I am writing an application in C# that uses LINQ to validate a datacontext off a textbox to see if the record exists already.  If the record does exist I inserted an if statement to advise the user that the record exists, if the record does not exist I would like to allow the record to be added to the database.  If I take out my else statement everything works fine as far as inserting goes, but I do not want to allow inserts in this scenario.  I have tried moving the if and else statement to different parts of the code but can't quite figure this one out.  Any help would be apprecaited, attached is the code.  This code is set to a button press.  As a matter of fact, if you see any other errors along the way please feel free to point them out. 



    protected void enterBTN_Click(object sender, EventArgs e)
        //make new data context

        SHCDataContext insNewAll = new SHCDataContext();
        //LINQ to check if customer exists in database
        var checkExisting = from c in insNewAll.Customers
                            where c.custLastName.Contains(custLastNameTB.Text.ToString())
                            select c.custLastName;
        //make list to store values

Visual Studio 2005: Create Reusable Project And Item Templates For Your Development Team


Visual Studio 2005 introduces a new model that lets you define your own project templates and starter kits, something developers have been requesting for some time. Here Matt Milner shows you how to consume, create, and customize these templates.

Matt Milner

MSDN Magazine January 2006

Basic Instincts: Objects and Values, Part 2: Memory Management


In the June 2002 installment of Basic Instincts I began a discus-sion of objects and values. This month I'll build on that column, so I will assume you've read the June installment and that you know the fundamental differences between value types and reference types.

Ted Pattison

MSDN Magazine October 2002

problem...i want a list item to populate all data in gridview!!!


i have a dropdownbox and a gridview

what I want is to have a list item which populates all data in a gridview.

I have tried using list item selected value=0 but to no avail.

what is the easiest way to achieve this?

Attach Workflow to Task List, don't get option to manually start workflow via dropdown on task item



I am running WSS 3.0 with other workflows which are functioning correctly.  I created a new workflow in Visual Studio 2008 and was able to successfully run it in my dev environment.  I attached the workflow to a task list in my dev environment and was able to manually start the workflow by using the drop down workflow option and using the menus to manually start it.  I installed this workflow in our production environment and attached it to the task list (which had a SPD workflow attached to it which stopped working about a month ago).  I made sure that the option to manually start the workflow was checked.  When I tried to manually start the workflow, (hover mouse over title, drop down) there isn’t a workflow option.  The workflow also will not start automatically when a task is changed.


I attached this same workflow to a different task list in production and get the option to start it.


I have tried creating a small workflow in SPD 2007 and attaching it to the task list.  It shows that it is attached, when I look at the workflows that are attached to the task list, but I still don’t get the option to manually start it.


I have checked my security and I have fu

Workflow Task And Relevant List Item


Hello there...

1. What is the name of  the field thats connect between the task item and  the list name or guid and the list item id or guid

2. SPD: how can when starting the workflow how can i ensure that the initial form variables will be saved at the workflow task list

Many Thanks



Assigning users when creating a list item in a workflow


I'm using a workflow to assign tasks to users.  When I try to assign the task to a group (set in the workflow designer), the workflow gives me an error.  When I change the assign to property to a single user, the workflow works perfectly.  How do I get the workflow to assign the task to the group?  Or if that's not possible, can I get it to assign it to more than one user?


KPI to calculate list item clicked most ?


Hello All:

Is there anyway where we can use KPI list to attach to a SharePoint list and indicates which item was clicked the most ? Or any other way to find out the best 5 links based on how many times they were accessed by a user?


Thanks in advance

SharePoint Developer
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