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

  • SEARCH
  • Home
  • 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 3627628
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:54:45+00:00 2026-05-18T23:54:45+00:00

So I need to create a webpart. I’d like some control over the design

  • 0

So I need to create a webpart. I’d like some control over the design process, and creating the code for the controls then build/compile wait for app-recycle and then F5 the sharepoint, rinse and repeat site is a pain.

I was reading that it’s possible to just create a regular user control, and have that load in the webpart. Ideal I think – but!

What about all of the sharepoint stuff? Like the properties, and interacting with sharepoint lists and so on? How would I accomplish this best from the user control?

What I need exactly, is a webpart displaying firstly a set of information of one item in a sharepoint list, and secondly it needs to show a scrollable list of items from another sharepoint list.

Is there a fancy way of getting pretty much the identical ‘environment’ or should I just go like:

using(SPSite site = new SPSite("http://mysite/")){
    using(SPWeb web = new SPWeb("myWeb")){
         //Fill a listbox with web.lists["myList"];
    }
}

From the code-behind of my usercontrol?

  • 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-18T23:54:45+00:00Added an answer on May 18, 2026 at 11:54 pm

    Yes, that is the write way.

    It’s just that instead of writing webpart directly, you can write the usercontrol and then host it in a wrapper webpart.

    The advantage of this approach is that you can have designer for creating UI elements which is available while creating usercontrol. For sharepoint 2007, the wrapper webpart is already available called smart part. To smartpart, you can just give the location of your user control(.ascx) to load.

    In sharepoint 2010, the smartpart can be built out of the box using Visual Studio 2010.

    http://smartpart.codeplex.com/

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

Sidebar

Related Questions

I need create menu for widget like this https://www.gstatic.com/android/market/com.bugabuga.switcher/ss-320-0-0 . What components are used?
i found XMPP on google (i need create a application IM look like Yahoo
I'm trying to create a custom search result webpart, and I need to develop
I'm trying to create a custom webpart. To implement error handling I would like
I need to create webpart in sharepoint 2010 which will allow me to view
I need to create webpart to display % of project completed from project server
I need to create recent activity webpart in sharepoint 2010, The webpart should show
I need to display all the employees in one webpart. I created the gridview
I need create custom dialog and put JPanel into it. Is it possible?
i need create an email list sending to many emails. what is best solution

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.