Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Data exists, NO data being returned

    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-------------

    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" } ], });
    The function call----------------

    Code:
    function LoadAnimDesc() { AnimalsGrid.fetchData(null, "AnimalsGrid.setData(data)", { params: { Names: Form1.getValue("sNames") } }); };
    The ListGrid------------------

    Code:
    var AnimalsGrid = isc.ListGrid.create({ autoFetchData: false, dataSource: "dataAnimNames", width: "80%", });
    The Comma separated string being passed to the vb.net page
    Mickey,Goofy
    The ShowAnimalsList.aspx vb.net page----------------

    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
    This is the table showing in the 'DataTable Visualizer' of the ShowAnimalsList.aspx vb.net page
    AnimalName Desc
    Mickey Mouse
    Goofy Dog

    #2
    As far as the data you're returning, all you've shown here is an HTML table, so we have no idea what your server is actually returning.

    You should look in the browser's built-in developer tools at the actual response, then compare it to your settings on your DataSource - there is extensive documentation on how DataSource settings control the expected response format.

    Note, you may not have to do any of this - there is already an article on integrating with ASP.NET MVC, with ready-to-use code implementing the full CRUD operations against any table.

    https://isomorphic.atlassian.net/wik...th+ASP.Net+MVC

    Comment

    Working...
    X