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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:11:35+00:00 2026-06-06T03:11:35+00:00

asp c# i have a page where user selects an item and its quantity

  • 0

asp c#
i have a page where user selects an item and its quantity to purchase and next item and so on
all items selected are filled in datatable and shown in gridview
at the end of selecting items
when user clicks process button
i want to insert all items and its quantities in database

on pageload a datatable is empty
on btn_Select_Click i hv filled in few rows
on btn_Process_Click i want to loop through these rows and insert records in db for each row

but it returns zero rows

  • 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-06-06T03:11:37+00:00Added an answer on June 6, 2026 at 3:11 am

    Your question is a little vague. “but it returns zero rows”… I’m guessing that what you mean is, that in the click handler for your button, when you access your grid object, it has no rows in it?

    Remember that each load of the page creates a whole set of brand new webcontrols. Webcontrol objects are not persisted in memory to be reused on each hit to the page.

    If you want the same rows available on this new page that is being rendered after the button click, you have to re-bind your grid. I’m guessing that isn’t happening in your code.

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

Sidebar

Related Questions

I have an asp:dropdownlist, and when a user selects an item, I am supposed
I have an ASP.NET home page where user provides his login ID. Depending on
I have an asp.net web page (C# 2008) where the user would enter an
I have an ASP.NET (3.5) page that allows a user to upload an Excel
I have an ASP.Net page, which displays a list of options to the user.
I have a asp.net/c# web app. When do user leave a certain page, I
I have a transaction button on my asp.net page. If the user clicks on
I have a file upload control on my page. When a user selects a
i have a dropdownlist on the page, now when user does not selects anything
I have ASP.NET page with an iframe on it for displaying some pdf reports

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.