Hi,
As we cant name file cotains "/",we need to replace "/" with "-"(you can use your replaceable character) Please refer below code.
C#
string imageName = string.Format("{0}", studentId).Replace("/","-"); // Pass StudentId
string imagePath = string.Format("~/Captures/{0}.png", imageName);
txtPath.Text = imagePath;
VB
Dim imageName As String = String.Format("{0}", studentId).Replace("/", "-")
' Pass StudentId
Dim imagePath As String = String.Format("~/Captures/{0}.png", imageName)
txtPath.Text = imagePath
I hope this will help you out.