Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Role"].ToString() != "Admin")
     {
         Response.Redirect("../Anonymous/ErrorPage.aspx");
     }
     if (!Page.IsPostBack)
     {
         CourseSource.SelectParameters["st_id"].DefaultValue = ((Label)GridView_st.Rows[0].Cells[0].FindControl("Label_St_Id")).Text;
         CourseSource.Select();
     }
 }
Beispiel #2
0
 protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
 {
     CourseSource.SelectParameters["st_id"].DefaultValue = ((Label)GridView_st.Rows[e.NewSelectedIndex].Cells[0].FindControl("Label_St_Id")).Text;
     CourseSource.Select();
 }