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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:29:38+00:00 2026-05-26T03:29:38+00:00

i have an asp.net application in c#. i have a table in a sql

  • 0

i have an asp.net application in c#.

i have a table in a sql server database with two fields:

Field1
Comments

i need to allow the user to SELECT the Field1 and add comments for that specific Field1

the user would then post the input back to the server

how do i accomplish this? which control can i use? is there already a simple jquery solution?

  • 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-26T03:29:39+00:00Added an answer on May 26, 2026 at 3:29 am

    This completely depends on your site setup. However if you have a list of Field1 values and put them in a DropDownList, you’ll be able to select one and add a comment in a box.

    This also heavily depends on your user interface / workflows. This is just one of MANY possible ways to do this.

    Code front

    <asp:DropDownList ID="ddlField1" runat="server">
        <asp:ListItem>Value1</asp:ListItem>
        <asp:ListItem>Value2</asp:ListItem>
        <asp:ListItem>Value3</asp:ListItem>
        <asp:ListItem>Value4</asp:ListItem>
    </asp:DropDownList>
    <asp:TextBox ID="tbComments" runat="server" TextMode="MultiLine"></asp:TextBox>
    <asp:Button ID="btSubmit" runat="server" OnClick="btSubmit_Click"></asp:Button>
    
    <asp:SqlDataSource ID="sqlRecord" runat="server"
        InsertCommand="InsertRecord" InsertCommandType="StoredProcedure">
        <InsertParameters>
            <asp:Parameter Name="Field1" Type="String" />
            <asp:Parameter Name="Comment" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    

    Code behind

    public void btSubmit_Click(object sender, EventArgs e)
    {
      // Do your validation of the data here
      ..
    
      // Add fields and insert
      sqlRecord.InsertParameters["Field1"].DefaultValue = ddlField1.SelectedValue;
      sqlRecord.InsertParameters["Comment"].DefaultValue = tbComment.Text;
      sqlRecord.Insert();
    }
    

    This is untested and partial pseudo code but should get you in the right direction for a general non-MVC web app. Also this doesn’t use any JavaScript / jQuery, just ASP.NET and C#.

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

Sidebar

Related Questions

I have an application in Asp.net and using sql server to store user information.
I have a table with two fields in an sql server database and my
We have an ASP.NET application that manages it's own User, Roles and Permission database
Here's the scenario: You have an ASP.Net application supported by a Microsoft SQL Server
I have an ASP.NET MVC Web Application that interacts with a SQL Server 2008
I have an ASP.NET Web Application using SQL Server 2008. When a post code
We have a web application written with asp.net/c# and uses sql server as SGBD
I have a database running on MS SQL Server 2005 and an ASP.NET 3.5
I have an ASP .NET application that connects to an Oracle or a SQL
We are developing a web application using asp.net and sql server. We are required

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.