473,396 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How do i set a limit for user to sign up in ASP.NET ??

3
How do i set a limit for user to sign up in ASP.NET ??

For example, I'm creating a web application using Microsoft Visual Studio 2008 to make it available for users to sign up for the event.
But i only wish to allow 10 people to sign up for that particular event.

So what code/thing i need to do to able to set the limit??


For your info : user only need to click one button to sign up for the event.
Nov 24 '10 #1
1 1269
Frinavale
9,735 Expert Mod 8TB
You are using a database or something right now to allow people to sign up for an event.

You probably have a table for the "Event" details (with columns like date, time, location etc.) In that table add an integer field/column called "numberOfAttendees" so that you can track the number of people attending the event. Whenever someone signs up for the event you can increment that value. If the maximum number of attendees (which you can also store as an integer field/column in your Event table if you want) is reached, then do not allow any more people to sign up for the event.

You do not have to add the "numberOfAttendees" column to your Events table if you don't want to. If you don't have this column, then you will have to query the table that contains the user-event-registration information and retrieve the COUNT value for the number of users signed up for the particular event in question.

The second approach is better from a Normalization standpoint, but since I have no idea how you have structured your database, I can't help you any further.

-Frinny
Nov 24 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: John Peter | last post by:
How can i limit the number of users on my .ASP page, i want only one user to be using the page at a time, The query i have on my page is big and takes a lot of my system resources. John
1
by: cw | last post by:
Hi all, Is anyone have an idea that limit message length input by user into textbox. I'hv tried the maxlength property by setting it to 150, but it seems like not working.., regards
6
by: Leo_Surf | last post by:
Hello, I need your help adding user in Active Directory from ASP.net website. Could any one provide me the complete code for the html page. As this is my curriculam project and I dont have any...
9
by: Shaun | last post by:
Anyone, I am trying to programmatically change user accounts in Windows NT 4. I am using Microsoft Visual Basic .NET 2003. The two things I am trying to do are as follows. 1. Set the User...
0
by: Elie Nacache | last post by:
Hi all, I've a Java application using postgresql-7.4.3. I'd like to not allow same user open 2 concurrent database sessions, because multiple sessions one user always cause trouble. how to do...
4
by: Randy Smith | last post by:
Hi, I would like to limit my user selection to only one row in the GridView at a time. Is there any way to set this? TIA, Randy
2
by: cyborg | last post by:
hi, i've a text area in my page and i want to limit user to key-in 200 characters only.once it goes beyond 200, i'm firing an alert message that the limit is reached. but when i use ctrl+a to select...
2
by: scolivas | last post by:
Hi to all...I am playing around with a voting database and was wondering if anyone could give me some ideas. I want to make it so that no one person can vote more than once. No matter how many...
1
by: helraizer1 | last post by:
Hi folks, In my script I have this code: <?php unset($errors); include ("linesfile.php5");
7
Jezternz
by: Jezternz | last post by:
Ok I have a registration/permissions system setup, and I want to limit different user groups to only allow for an amount of downloads. (and non-logged in users to not have the ability to download...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...

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.