Took me some time to figure out how to refresh/reload a page so i decided to do it with some javascript. Not the most elegant solution but it works, if you know how to write a cleaner solution let me know.
GeSHi (csharp):
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//PersoonDataSetTableAdapters.PersonenTableAdapter Adapter = null;
//Adapter = new PersoonDataSetTableAdapters.PersonenTableAdapter();
// GridView1.DataSource = null;
if (Page.IsPostBack)
{
//GridView1.DataSource = Adapter.GetPersoon();
//GridView1.DataBind();
Label1.Text = "postback? " + Page.IsPostBack;
string scriptString = "<script language=JavaScript>window.location.href=window.location.href </script>";
if (!Page.ClientScript.IsClientScriptBlockRegistered(scriptString))
{
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "script", scriptString);
}
}
if (!Page.IsPostBack)
{
// GridView1.DataSource = Adapter.GetPersoon();
// GridView1.DataBind();
Label1.Text = "postback? " + Page.IsPostBack;
}
}
}
Created by GeSHI 1.0.7.20