public static string CreateLink(object value, string UserControlName, string FieldName) { string link = "<a href=\"javascript:void(0)\" onClick=\"openCreateID('" + FieldName.ToLower() + "Name','" + UserControlName + "')>Enter " + FieldName + @"'s Info first</a>"; if (value != null && value.ToString() != "0") { return string.Format("<a href=\"javascript:void(0)\" onClick=\"openPeopleID('{0}')>" + FieldName + "'s Information</a>", value); } return link; }But it produces expected ; error in JavaScript and weird page output.