protected void asd_Click(object sender, EventArgs e) { if (Common.Common.ApplicationInformation.LoggedInUser.RGroupIds != null) { string Documentid = string.Empty; string GroupIds = string.Empty; string DocumentIds = string.Empty; string ContactIds = string.Empty; //---------------- if (Session["ReportDocumentIDs"].ToString() != null) { DocumentIds = Session["ReportDocumentIDs"].ToString(); Documentid = DocumentIds.Substring(0, DocumentIds.LastIndexOf(',')); } else { Documentid = null; }
MSDN wrote:String.LastIndexOf method reports the zero-based index position of the last occurrence of a specified Unicode character or string within this instance. The method returns -1 if the character or string is not found in this instance.
String.LastIndexOf
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)