levyuk
Well-known member
VB.NET:
[size=2][/size][size=2][color=#0000ff]Sub[/color][/size][size=2] Delete_Item([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] s [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]Object[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] e [/size][size=2][color=#0000ff]As[/color][/size][size=2] DataGridCommandEventArgs)
DT = Session([/size][size=2][color=#800000]"Cart"[/color][/size][size=2])
DT.Rows(e.Item.ItemIndex).Delete()
Session([/size][size=2][color=#800000]"Cart"[/color][/size][size=2]) = DT
dg.DataSource = DT
dg.DataBind()
LabelTotal.Text = [/size][size=2][color=#800000]"£"[/color][/size][size=2] & Cart.GetItemTotal(DR, DT)
[/size][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]Sub
[/color][/size]
How do I turn the above sub into a function in another Class so that I can call it something like this
Dim Cart as new Cart
Cart.Delete()
How can I make that work?