generate nadum number and change image randomly

Rajesh
Posted by Rajesh under C# category on | Views : 2596
Random rndClass = new Random();
int intImgNum = rndClass.Next(1, 10);
imgSubPage.ImageUrl = "../images/header-sub-" + intImgNum.ToString() + ".jpg";

Comments or Responses

Login to post response