Tuesday, March 8, 2011

Get value from Row Command C#

//get value from linkbutton commandArgument isbn id
string isbn =Convert.ToString( e.CommandArgument);
Session["Inventory_ISBN"].ToString = isbn;

//get value from hidden filed
LinkButton btnedit = (LinkButton )(e.CommandSource);
HiddenField hf = (btnedit.Parent.FindControl("vendorid_hidden")) as HiddenField;
Session["Inventory_vendorid"] = Int32.Parse(hf.Value);///Datekey value

No comments:

Post a Comment