protected void Button1_Click(object sender,EventArgs e)
{
respose.write("<script type='javascript'">
response.write("window.open('default.aspx');");
response.write("</script>");
sqlconnection con=new sqlconnection("connection string.");
sqlcommand cmd=new sqlcommand("insert into sub value('a','b')",con);
con.open();
cmd.ExecuteNonQuery();
con.close();
}
it will fire two event at a time, it will popup the default.aspx page and also insert data into sub table...
{
respose.write("<script type='javascript'">
response.write("window.open('default.aspx');");
response.write("</script>");
sqlconnection con=new sqlconnection("connection string.");
sqlcommand cmd=new sqlcommand("insert into sub value('a','b')",con);
con.open();
cmd.ExecuteNonQuery();
con.close();
}
it will fire two event at a time, it will popup the default.aspx page and also insert data into sub table...
No comments:
Post a Comment