Hello everyone,
I have Json string on my webpage
I try to use it with label but i cant get the string ! what am i doing wrong *
thanks for helps
I have Json string on my webpage
[{"name":"Test 1","company":"Mictosoft","tel":"+3332156987"},{"name":"Test 2","company":"Mictosoft","tel":"+33111111111"}]
using System.Web.Script.Serialization;
namespace WindowsFormsApplication4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
var jss = new JavaScriptSerializer();
var dict = jss.Deserialize<dynamic>("www.google.com/json.php");
label1.Text = dict["name"];
label2.Text = dict["company"];
label3.Text = dict["tel"];
}
}
}