Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click Dim strArr() As String Dim itemcount As Integer Dim count As Integer Dim str As String = txtBillNo.Text Dim forlabel As String strArr = str.Split(',') For itemcount = 0 To strArr.Length - 1 superTypeObj.PSearchText = strArr(itemcount) dsdata = superTypeObj.SearchCourierByBillno Dim row As DataRow = dsdata.Tables(0).Rows(0) count = dsSearch.Tables(0).Rows.Count If count <> 0 Then row = dsdata.Tables(0).Rows(0) dsSearch.Tables(0).Rows.Add(dsdata.Tables(0).Rows(0).ItemArray) Else forlabel += strArr(itemcount) & ", " & "" End If Next 'superTypeObj.PSearchText = txtBillNo.Text ' dsSearch = superTypeObj.SearchCourierByBillno count = dsSearch.Tables(0).Rows.Count If count > 0 Then If count <= 15 Then Dg.PagerStyle.Visible = False End If Dg.DataSource = dsSearch Dg.DataBind() lblMsg.Text = "following" & forlabel & " Waybillnos are not correct " Else Dg.Visible = "False" lblMsg.Text = "following" & forlabel & " Waybillnos are not correct " End If End Sub
str.Split(vbCrLf)
System.Environment.NewLine
System.StringSplitOptions.RemoveEmptyEntries
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)