Hi,

I'm fairly new to AjaxPro, and I can't quite get a grip on how AjaxPro
handles .net objects.

In my program, I want to check a long list of url's to see if they
still exist/timeout/... This is easy enough, but, I want to show the
user what's going on while the server is performing the url checks. So
I turned to AjaxPro...

Again, I'm still a complete AjaxPro idiot, so any suggestions on how
this can be done better are welcome :)

In my js file, I have the following functions:

function start_url_check()
{
    NS.getURLs(MyCallback);
}

function MyCallback(res)
{
    for(var i = 0; i < res.value.length; ++i)
    {
        NS.CheckLink(res.value[i], link_checked_callback,
res.value[i]);
    }
}

The getURLs function looks like this:

    [AjaxPro.AjaxMethod]
    public ArrayList getURLs()
    {
        Threads = new ArrayList();
        con = new DBConnector();

        string sql = "SELECT top 10 AttributeValue as URL FROM
NodeAttributeValues WHERE AttributeValue LIKE 'Http://%' ORDER BY
AttributeValue";
        DataTable tb = con.getData(sql);
        int count = 1;

        foreach (DataRow dr in tb.Rows)
        {
            MyThread mt = new MyThread((string)dr["URL"], count);
            Threads.Add(mt);
        }

        return Threads;
    }

So, what I want my program to do is that it starts a thread for each
url it has to check, so I dont have to wait if one url is timing out...

I didn't write any useable code for the CheckLink method yet, because
I'm running into a problem here. The problem is that I want to access
the MyThread object, but all i got is a string that looks like this:

"new
Ajax.Web.Dictionary(\"System.Collections.Specialized.HybridDictionary\",\"System.String\",\"AjaxPro.JavaScriptString\",[[\"__type\",\"MyThread,
App_Code.bacazype, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null\"]])"

I don't have a clue what I have to do to convert this string into an
object I can use, so can anyone help me here?

thanx


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info/

Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
-~----------~----~----~----~------~----~------~--~---

Reply via email to