<script runat=server>
public void Page_Load(Object sender, EventArgs e)
{
// Initialize only the first time...
if (!Page.IsPostBack)
{
lblURL.Text = Request.Url + "<hr>";
}
}
public void OnLoadData(Object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection(txtConn.Text);
SqlDataAdapter da = new
SqlDataAdapter(txtCommand.Text, conn);
DataSet ds = new DataSet();
da.Fill(ds, "MyTable");
// Display the data
lblOutput.Text = "";
grid.DataSource = ds.Tables["MyTable"];
grid.DataBind();
grid.Visible = true;
}
</script>