public string GetUserPictures(string userid, string paginatedPageNumbers) { int paginatedPageNumber = Int32.Parse(paginatedPageNumbers); int numberOfPictures = Usr.CountAllUserPictures(userid); if (numberOfPictures != 0) { List <string> photos = Usr.GetAllUserPicturesPaginated(userid, paginatedPageNumber); string imgsrc = "<a class=\"popupBoxClose\" onclick=\"unloadPopupBox(changePhototFromGallery)\" >X</a>"; foreach (string photo in photos) { imgsrc += "<img class='notSelected' src=\'" + photo + "\' onclick = \"SelectPicture(this)\" />"; } imgsrc += "<br /><a onclick=\"ajaxChangeProfilePic('" + userid + "')\" class='buttonclass'>Zmień zdjęcie</a>"; string paginatedLinks = ""; if (numberOfPictures > Usr.maxPhotosPerUploadNewProfilePicture) { paginatedLinks = CreatePaginatedLinks(paginatedPageNumber, userid); } //in javascript function which recieve response, check if value after '|' is not equal to 0, //if not, then pagination links should be replaced return(imgsrc + "|" + paginatedLinks); } return("Nie dodałeś żadnych zdjęć do galerii"); }