Hi
I have developed a following VB code for load data to google chart. But data not loaded.
<WebMethod()>
Public Shared Function GetChartData1() As List(Of List(Of Object))
Dim constr As String = ConfigurationManager.ConnectionStrings("constrINVDB").ConnectionString
Dim chartDatas As List(Of List(Of Object)) = New List(Of List(Of Object))()
Using con As SqlConnection = New SqlConnection(constr)
Using cmd As SqlCommand = New SqlCommand("Vendor_Performance_Overall")
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@StoreID", SqlDbType.Int).Value = HttpContext.Current.Request.QueryString("StoreID")
cmd.Connection = con
Using sda As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim ds As DataSet = New DataSet()
sda.Fill(ds)
For Each dt As DataTable In ds.Tables
Dim chartData As List(Of Object) = New List(Of Object)()
chartData.Add(New Object() {"Vendor", "Overall"})
For Each row As DataRow In dt.Rows
chartData.Add(New Object() {row("Vendor"), row("Overall")})
Next
chartDatas.Add(chartData)
Next
End Using
Return chartDatas
End Using
End Using
End Function
Please advise me load data using QueryString in WebMethod.
https://localhost:44357/Store/Vendor_Performance_M.aspx?StoreID=15
Thanking you,
samsmuthu