its a web application
vasavi p
Posts
-
hide header and footer while printing a webpage in C# [modified] -
hide header and footer while printing a webpage in C# [modified]I want to hide Header(ie. Displaying the URL of the Page) and Footer(ie. getting page number and the current date and time) while printing a webpage using c#. Thanks in Advance
modified on Tuesday, October 6, 2009 6:26 AM
-
Need the code for Randomization of numbers using c#hi try with the below code protected void Button1_Click(object sender, EventArgs e) { Label1.Text = ""; int Quescnt = 6; string Randomnos = string.Empty; for (int i = 0; i < Quescnt; i++) { int RandomNumber = RandomClass.Next(28, 37); if (!Randomnos.ToString().Contains(RandomNumber.ToString() + ",")) { Randomnos = Randomnos + RandomNumber.ToString() + ", "; } else { Quescnt++; } } Label1.Text = Randomnos; } and try with this too[this will go to infinite loop] protected void Button1_Click(object sender, EventArgs e) { Label1.Text = ""; int Quescnt = 6; string Randomnos = string.Empty; for (int i = 0; i < Quescnt; i++) { int RandomNumber = RandomClass.Next(28, 33); if (!Randomnos.ToString().Contains(RandomNumber.ToString() + ",")) { Randomnos = Randomnos + RandomNumber.ToString() + ", "; } else { Quescnt++; } } Label1.Text = Randomnos; }
-
Need the code for Randomization of numbers using c#hi thanks for the reply. i want to copy all the random's numbers in a string separating by a comma. i.e Randomnos = "2,5,3,1,4"; This "Quescnt" comes from database. when this Quescnt and the MaxValue in RandomClass.Next(Min, Max) are equal, its going to infinite loop.
-
Need the code for Randomization of numbers using c#I have used the following code. when the "Quescnt" and the "max value(Int32.Parse(ds.Tables[1].Rows[cnt-1][0].ToString()))" are equal, its going to infinite loop. static int TheSeed = (int)DateTime.Now.Ticks; Random RandomClass = new Random(TheSeed); string Randomnos = string.Empty; for (int i = 0; i < Quescnt ; i++) { int RandomNumber = RandomClass.Next(Int32.Parse(ds.Tables[1].Rows[0][0].ToString()), Int32.Parse(ds.Tables[1].Rows[cnt-1][0].ToString())); if (!Randomnos.ToString().Contains(RandomNumber.ToString() + ",")) { Randomnos = Randomnos + RandomNumber.ToString() + ", "; } else { Quescnt++; } }
-
validations for the controls that are dynamically created at runtimei need to validate the Textboxes that are created at runtime. The text should not be blank and it should allow only numbers.
-
randomization of numbers without duplication in C#Need the randomization of numbers without repeatation using c#