Click here to Skip to main content
15,885,874 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
in my project i have a shopping cart page.. In this i used continue shopping as a button to continue the shopping.. but i have a one problem.. after click on this new random number is generated so in the cart page only one product is displayed..
Posted
Comments
OriginalGriff 30-Mar-14 6:16am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
I can't see any good reason for using a random number generator at all...what are you using it for in a shopping cart app?
Use the "Improve question" widget to edit your question and provide better information.
Krunal Rohit 30-Mar-14 6:37am    
Elaborate.

-KR
Maciej Los 30-Mar-14 6:46am    
Not a question at all! Please, be more specific and provide more details. The piece of code would be much appreciated.
King Fisher 31-Mar-14 2:39am    
what have you tried?
Member 15329613 20-Oct-21 7:44am    
I see that this is old but it is clear that none of the solutions even read the question. And it's not even a long question. The title is misleading and poorly written.

c# has a random function that you could use to generate random numbers. This can be used to generate random item lists.
 
Share this answer
 
Random class is there in c#
Random rd=new Random();
int no=rd.next() //get random non repetitive no's

...your question is not clear,I think this will help you to solve your problem
 
Share this answer
 
private readonly Random _rng = new Random();
private const string _chars = ABCDEFGHIJKLMNOPQRSTUVWXYZ ;



public string RandomString(int size)
{
char[] buffer = new char[size];

for (int i = 0; i < size; i++)
{
buffer[i] = _chars[_rng.Next(_chars.Length)];
}
return new string(buffer);

}




MARK AS Answer IF YOU GET RESULT
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900