Hugo Woesthuis Hugo Woesthuis - 24 days ago 5
JSON Question

Is it possible to programmatically execute JSON queries with C# (ASP.NET)

As the title says: is it possible?

You should think of the following scenario: I press a button in ASP.NET -> some C# backend -> Execute a JSON string

So something like this:

protected void Unnamed1_Click(object sender, EventArgs e)
string check = (string)(Session["usr"])

if(check == null;)
// Execute JSON

Does anyone know how to do this?

Thanks in advance.


You need to use this method

RegisterStartupScript(scriptname, jsonstring);

This will put the script on top of the html page. Further read: