protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Kurv nyKurv = new Kurv(); GridView1.DataSource = Session["kurv"]; GridView1.DataBind(); Label_PrisIAlt.Text = nyKurv.prisIalt(0).ToString(); } }
protected void Page_Load(object sender, EventArgs e) { Kurv nyKurv = new Kurv(); GridView1.DataSource = Session["kurv"]; GridView1.DataBind(); Label_prisIalt.Text = nyKurv.prisIalt(0).ToString(); SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString()); SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; if (!IsPostBack) { repeaterData(); } }