473,595 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

shopping cart control not being loaded fast enough

psb
imagine a shopping cart application. I am on the product details page.
this page has a cart summary on the right hand side of the page. the cart
summary is a webcontrol that sits in the aspx page like this:

<GSG:CARTSUMMAR Y id="CartSummary " runat="server"> </GSG:CARTSUMMARY >

in this webcontrol is a datagrid of all items in the cart. this particular
application has a Max Order Quantity Limit. At the bottom of the product
details page is a textbox for quantity to order and a submit button. The
submit button has to check 2 things.

1. is clng(txbQuantit y.Text) > 0 AND
2. is clng(txbQuantit y.Text) + lngQtyInCart > MaxOrderQuantit y.

lngQtyInCart could be retreived from the database, but I was getting
creative and didn't want to have to do similar lookups since the cart
quantity is already on the page in the cartsummary control. SO, onthe
btnSubmit_Serve rclick() event, I find the control and loop through the items
in the datagrid. I find the quantity and do the math. works very nicely.
Here is where the problem comes in. If I click the "submit" button too
fast. I get an error: "Object reference not set to an instance of an
object." It can't find the cartsummary control, like it hasn't loaded yet.
has anyone seen this before?? I think I will just go straight to the
database.

thanks in advance for any responses...
Nov 18 '05 #1
0 944

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2531
by: Derrald | last post by:
I have had two clients recently ask me about shopping carts. I have also been using PHP on a more regular basis and thought I could find an open source shopping cart such as oscommerce. It seems as though oscommerce requires "register globals" turned on. I know this is a bad idea. Also my hosting company won't turn them on (not that I would want that). This got me thinking about a few things and I was wondering what others experience on...
2
2852
by: Don Grover | last post by:
I am retrieving costs and product id's from a sql db. and need to build a shopping cart around it. How do I store the selected items and qty req so I can move into another catalog and total up as im going. Just a couple of hints will do, Im familiar with vb script but not java based code , and im wondering how to store what they select so I can move around different product ranges. Don
2
3300
by: Paul Bruneau | last post by:
Hi, I hope someone can help me make a working shopping cart, as a learning tool. If I have a "Product Demo" html page with a "Buy Me" button, there must be a simple javascript method of storing the necessary product information. There could be several fields involved... Then there ought to be another javascript method that can create a new document based on the list a user has built selecting product from several
1
3572
by: madison | last post by:
Hi, I am trying to start a website using paypals shopping cart function. If i have 10 items and they sell out, how do I make it so the item is then listed as sold out. The next person would not be able to come along and add it to their shopping cart. thanks joy
2
2356
by: Paul Hobbs | last post by:
Hi All, I am developing a site that makes use of a standard shopping cart. Anyone can add items to the cart, but only registered users can actually check out. When a user tries to check out, if they are not logged in they will be prompted to either login or register before they can proceed to the checkout. There is NO requirement to allow users to add items to a shopping cart, and return at some time in the future and still have...
2
2288
by: G.E.M.P | last post by:
High Level Session Handling Design for a Shopping cart 0) What am I missing? 1) How does OSCommerce do it? I'm thinking about building a shopping cart from scratch, using a library of dynamic screen generation routines (already written) that take an XML stream as input from various "search for products" forms. That way I can run queries in one window and display the dynamic results in another. The searching functions will probably
7
2624
by: isaac2004 | last post by:
hi i have a basic asp page that acts as an online bookstore. on my cart page i am having trouble generating 3 numbers; a subtotal, a shipping total, and a final price. here is my code i would like it to work properly so that a record count counts through all the books and genertates these numbers. watch out for line breaks <%@ Language=VBScript %> <% Option Explicit %> <!--#include file="DatabaseConnect.asp"-->
1
2090
by: Vahehoo | last post by:
Hi, I have an ASP .Net e-business site that is built using DNN 2.0. I am having troubles passing my shopping cart items to PayPal. I implemented a total paynow button, but it was not good enough for my customer. I found some PayPal ASP.Net controls to be used with .net studio. Basically, I want the user to be able to shop on my website, add items to my shopping cart and at the checkout to be taken to the PayPal website. I would like...
1
7281
by: jecha | last post by:
I'm implementing a shopping cart but am having a problem in checking out a person who has added item in his/her shopping busket.The code for the checkout.php script is given below <? require_once('functions.inc.php'); session_start(); do_html_header("Checkout"); $cart = $_SESSION; if($cart&&array_count_values($cart)) { display_cart($cart,false,0); display_checkout_form($HTTP_POST_VARS);
0
7957
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7883
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8020
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8252
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6675
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5421
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3875
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3915
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.