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 498485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:53:18+00:00 2026-05-13T05:53:18+00:00

I am writing a SharePoint web part that interacts with a SQL database, allowing

  • 0

I am writing a SharePoint web part that interacts with a SQL database, allowing users to set a few parameters with some dropdownlists and pull the record for a given customer.

I would like for one of three particular HTML tables to be displayed once the customer is selected. What I am confused about is how I can render HTML after the page has already ran RenderContents. Initially, I just need the ddls and a button to be displayed so that the user can make their selections, so I have put those in the RenderContents method. Once they click the button, I’d like to display one of three tables containing the data, which would be determined by the parameters they have set. I’m not sure how to begin writing such a method, although I’m sure it would involve HtmlTextWriter. This is pseudocode to represent what I need:

protected override void RenderContents(System.Web.UI.HtmlTextWriter output)
{
    ... displays dropdownlists and button ...
   renderMachineSpecifications();
}

void renderMachineSpecifications()
{
   if (record returned according to ddls is in the range 1000-1999)
   {
        // Render table type A and fill with information from database
   }
   else if (record returned according to ddls is in the range 2000-2999)
   {
        // Render table type B and fill with information from database
   }
   else
   {
        // Output error message
   }
}

Thanks very much!

  • 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-13T05:53:18+00:00Added an answer on May 13, 2026 at 5:53 am

    I’m afraid this is a problem that’s screaming for AJAX. Here is the link to ASP.NET AJAX inside SharePoint (MSDN). If you google around you may also find some other nuggets like this one on CodePlex.

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

Sidebar

Ask A Question

Stats

  • Questions 346k
  • Answers 346k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There really is none. The index on both table or… May 14, 2026 at 6:08 am
  • Editorial Team
    Editorial Team added an answer Use the table cell's selectedBackgroundView property. If you assign a… May 14, 2026 at 6:08 am
  • Editorial Team
    Editorial Team added an answer By using ToCharArray you are saying "split on any of… May 14, 2026 at 6:08 am

Related Questions

I am writing a SharePoint web part which will have a simple ASP.NET form.
I am involved in writing a little internal SharePoint portal for our company. I
I have used the following article as a guide to creating a custom EditorPart
I am trying to connect a filter web part with a document list web
I come across this problem when i am writing an event handler in SharePoint.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.