I am passing in a comma-separated string from a .aspx page to a vb.net page. I want to cycle through this string and give me the results in a table that is passed back to the .aspx page, displayed in a SmartClient ListGrid. The problem I'm having is that even though the vb.net page shows that the table has been constructed with no errors, no data is being returned. I may be sending the data back to the .aspx page the wrong way or something, because I am getting an empty ListGrid. I am not seeing any errors on the console either... just nothing at all. What am I doing wrong here?
Here is the JS in the .aspx page:
The DataSource-------------
The function call----------------
The ListGrid------------------
The Comma separated string being passed to the vb.net page
The ShowAnimalsList.aspx vb.net page----------------
This is the table showing in the 'DataTable Visualizer' of the ShowAnimalsList.aspx vb.net page
Here is the JS in the .aspx page:
The DataSource-------------
Code:
var dataAnimNames = isc.DataSource.create({ dataURL: "DataScripts/ShowAnimalsList.aspx", recordXPath: "/NewDataSet/DATA", fields: [ { name: "AnimalName", type: "text", title: "Name" }, { name: "Desc", type: "text", title: "Description" } ], });
Code:
function LoadAnimDesc() { AnimalsGrid.fetchData(null, "AnimalsGrid.setData(data)", { params: { Names: Form1.getValue("sNames") } }); };
Code:
var AnimalsGrid = isc.ListGrid.create({ autoFetchData: false, dataSource: "dataAnimNames", width: "80%", });
Mickey,Goofy
Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim NameList As String = Request("Names") Dim Names As String() = NameList.Split(New Char() {","c}) Dim cTypes As New TypeLib.clsTypes Dim Desc As String Dim dsNames As New DataSet Dim dtNames As New DataTable dtNames.Columns.Add("AnimalName") dtNames.Columns.Add("Desc") Try If NameList.Count > 0 Then For Each Nme As String In Names If Nme.Trim = "" Then Continue For Nme = Nme.Trim Desc = cTypes.GetAnimDesc(clsUtility.ConStr, Nme) Dim row As DataRow = dtNames.NewRow() row("AnimalName") = Nme row("Desc") = Desc dtNames.Rows.Add(row) Next dsNames.Tables.Add(dtChgs) dsNames.Tables(0).WriteXml(Response.OutputStream) End If Catch ex As Exception 'no errors here... End Try End Sub
AnimalName | Desc |
Mickey | Mouse |
Goofy | Dog |
Comment