basically i wish to set a session folo by button click, but i failed to do so
i failed to call abcde function(), don’t know what to set,i did try onRowCommand,onDataBound,OnDataBinding
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
my link button on gridview
<asp:LinkButton ID="lnkname" runat="server" Text='<%#Eval("movieTitle") %>' Width=500 CommandName="cmdLink">
in order to find link button control i did try DataGridItemEventArgs, but it didnt work as well
protected void abcde(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "cmdLink")
{
string path = //some path;
Session["path"] = path;
((LinkButton)e.Item.FindControl("lnkname")).PostBackUrl = "~/somewhere/ + Session["path"].ToString()";
}
}
y i do so is because my next page function is depend on the session
Ok, I’m not entirely sure what you mean, however in case you’re asking how to manipulate controls within the grid on databinding, it goes like this: