Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6210563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:10:56+00:00 2026-05-24T06:10:56+00:00

On my home page, I want a simple webpart that allow users to quickly

  • 0

On my home page, I want a simple webpart that allow users to quickly fill an entry in a list.

The list have, let’s say, three fields : title (text), body (rich text), category (lookup).

I don’t want to use the standard DataFormWebPart because I have a bit of code-behind that also fill some technical hidden fields of my list (actually, I don’t exclude the DataFormWebPart, but I didn’t find how to use it with code behind).

So I started to implement a custom webpart. Because I don’t want to have to handle manually each field input, I started to use the FormField control, which automatically choose the rendering control, and provide a Value property with the correct format :

<SharePoint:FormField runat="server" id="fldTitle" FieldName="Title" />

This code is not sufficient, I have to specified the listid :

<SharePoint:FormField runat="server" id="fldTitle" FieldName="Title" ListId="{title list guid}" />

This is working quite correctly. I can in code access the fldTitle.Value to retrieve the user input.

BUT I have to include the webpart in a properly packaged and deployed feature, that can be activated. The webpart will always target the same list, but as the list is also instanciated in the feature (ListInstance element), I can’t know the Guid in advance.

I’ve tried using several technics to set the list ID on the fly, but without success.

I’ve also “reflectored” the SP dlls to notice FormComponent class are using a “Context” that is set by ListFormWebPart.

Finally, my questions are :

  • is it the correct way to create a custom input webpart on the home page (not a list custom form) ?
  • how can I keep the behavior of the FormField (choose the right control and handle the input and its conversion to the storage format) ?
  • Will I have to create a custom ListFormWebPart ?
  • May I play with ControlTemplates ?

thanks in advance for the help… I’m struggling with this simple case for days now…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:10:57+00:00Added an answer on May 24, 2026 at 6:10 am

    I think that customizing form templates is the easiest way to customize list forms. Since custom form templates are implemented as user controls you can add whatever code you want.
    See the following article:
    http://www.codeproject.com/KB/sharepoint/SharePointListForms.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say you have this scenario:a simple blog home-page that loads both static content
i have website of application which sells applications online.on the home page i want
I have some tabs on a page and I want to let a user
I want to build a simple blog which contains: A home page with blogs
I'm building a website with user generated content. On the home page I want
I want to display the number of products on home page . My code
I my wordpress blog in home page which shows some details of products.I want
I have an ASP.NET home page where user provides his login ID. Depending on
I want to code simple app, with index and about page, without using db,
So here is the deal, I have a registration page, in that they need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.