Access columns in dataset!please help
Hi Everybody!,
i have a problem and i'd like to have your help.
here is my problem i have a dataset with three columns including UserID,UserName,Password.I want to get the UserID to a Session variable, how do i access the dataset so that i can have a session name UserID that i get in the dataset in my web page.
Thank you very much.
Minh anh
Re: Access columns in dataset!please help
Try puting something like this in your data grid EditCommand procedure.
VB Code:
DataGrid1.DataKeyField = "UserID"
DataGrid1.EditItemIndex = e.Item.ItemIndex
DataGrid1.DataBind()
Session("UserID") = e.Item.Cells(0).Text
Re: Access columns in dataset!please help
Code:
Session["UserID"] = MyDataSet.Tables[x].Rows[y]["UserID"].ToString();