I am writing to seek advice in creating a javascript function, which can display one dataset when the page loads and when the user clicks on the dropdown menu, it filters the data using dataset2.

This is what I currently have in page behind:
Code:
protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
			//dataset 2
            JavaScriptSerializer jss = new JavaScriptSerializer();
            ClientScript.RegisterStartupScript(this.GetType(), "TestInitPageScript",
           string.Format("<script type=\"text/javascript\">google.load('visualization','1.0',{{'packages':['corechart','controls']}});google.setOnLoadCallback(function(){{drawVisualization({0},'{1}','{2}','{3}');}});</script>",
            jss.Serialize(GetData()),
        "Name Example",
        "Name",
        "Type Example",
         "Type,"));

            }

        if (!IsPostBack)
        {
			//dataset 2
            JavaScriptSerializer jss = new JavaScriptSerializer();
            ClientScript.RegisterStartupScript(this.GetType(), "PageScript",
           string.Format("<script type=\"text/javascript\">google.load('visualization','1.0',{{'packages':['corechart','controls']}});google.setOnLoadCallback(function(){{drawVisualization2({0},'{1}','{2}','{3}');}});</script>",
            jss.Serialize(GetData2()),
        "Name Example",
        "Name",
        "Type Example",
         "Type,"));
        }
        }
If anyone, could provide some guide/links into how can I get this task started, please, that would be very helpful.
Many thanks.