473,378 Members | 1,393 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,378 software developers and data experts.

how to do auto generation of numbers in C#.Net

Hi,

I am manivel.. Am doing C#.Net project.. I want to display the auto generation of numbers in a text box starts from 1.. But i dont know how to implement this.. If any one knows plz inform me..

Thanks in advance..

With regards,
Manivel. K
Jan 21 '08 #1
3 5905
IanWright
179 100+
Your question isn't very clear but...

to auto-generate the numbers you will probably want to use a for loop. Then as you itterate through this loop add the results to your text box...

Expand|Select|Wrap|Line Numbers
  1. Create Textbox
  2. Add Textbox to form
  3.  
  4. for (start, end, increment)
  5.   add value to textbox
  6.  
Hi,

I am manivel.. Am doing C#.Net project.. I want to display the auto generation of numbers in a text box starts from 1.. But i dont know how to implement this.. If any one knows plz inform me..

Thanks in advance..

With regards,
Manivel. K
Jan 21 '08 #2
hi,

Thanks for your reply..

I tried that but the last value of the loop only displayed in text box.. I need to display the first value and increment that.. how this is possible..
Thanks in advance..
Jan 22 '08 #3
Shashi Sadasivan
1,435 Expert 1GB
what you are probably doing is

Expand|Select|Wrap|Line Numbers
  1. for(int i = 0;  i < maxNumber; i++)
  2. {
  3.    this.textBox1.Text = i.toString();
  4. }
what you would need to do is create a delegate and link it to a method incrementing the value on a certain interval.

option 2:
Use a time Control, and in the time_tick event increment the value of the text box.
Jan 22 '08 #4

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

Similar topics

4
by: mescaline | last post by:
hi, i'm new to C++ could anyone refer me to a good site / good examples of random numbers? in particular including: 1) the commnds to obtain normally and exponenetially distributed r...
0
by: Greg | last post by:
Hello, I'm about to write a database application and I'm wondering how to approach it. Is it worth to use the database code auto-generation (VC# 2005) in the long run? Or at some point I'll be...
13
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when...
22
by: gagan.singh.arora | last post by:
Hi there. I want to generate random numbers with a given probability, say 80% even and 20% odd. Is it possible to implement such an algorithm in C?
2
by: smugcool | last post by:
hi All , I have got an idea of auto ticket generation through a program. Where it will import any new mail which will arrive at outlook and then it will auto generate a ticket id. I just wanted to...
13
Hiren Joshi
by: Hiren Joshi | last post by:
Hi All, VB 6.0 and MS Access While Saving Record, I want Number to be Generated in following Format 140208-001, 140208-002, 140208-003 . . . etc... You must have noticed that 140208 is...
3
by: ramab | last post by:
Hi, im trying to merge 2 databases having the same structure. How do i merge the two databases which have unique identifiers and auto numbers. e.g the first 10 records in table A , it will have auto...
2
by: Irving Guy | last post by:
Hi all, I’m trying to create a form with 15 fields that generates an auto number in one of those 15 fields. The auto generated number which should display like this – “081-2008-00001”...
5
by: David Wright | last post by:
Hello Everyone I would be grateful if someone could help me with the automatic increment of a field on my subform called ‘Test_SrNo’. I am Using Microsoft Office 2000. The auto entry of the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.