Accessing label ID from DataGrid Args?

  • Thread starter Thread starter Patirck Ige
  • Start date Start date
P

Patirck Ige

I have a sub program that updates a DataGrid like below
And i'm makiing use of the OrderID to update the data

Sub Update(ByVal Src As Object, ByVal Args As DataGridCommandEventArgs)
Dim OrderID As Label = Args.Item.FindControl("OrderID")
Dim ord_id As String = OrderID.Text
End Sub

But i now have another sub program below and i would like to make use of the
same OrderID
used in the Update Sub :-

Sub GetName_Email()
Cmd.Parameters.Add(New SqlParameter("@OrderID", SqlDbType.Int, 4)).Value =
OrderID.Text
End Sub


How can i get access to it if i use "OrderID.Text" or "ord_id" is says its
not defined which is true??
 
call it from within the same event, then there is no hassle, or pass the
info to your sub.
 
But Curt my Sub doesn't have the same event as the Sub Update
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top