VS2010 Set session object from gridview template imagebutton
<p>I hada gridview having a basic contact details. Also I added a template ImageButton with the purpose of setting session object and navigate to x page with new session value. I tried with posting with javascript but there seems to be an issue with querystring if the page is attached inside frame. </p>

<pre><code>f (e.Row.RowType == DataControlRowType.DataRow)       
        {
         DataRowView rowView = e.Row.DataItem as DataRowView;

         ImageButton imgbtn= (ImageButton)(e.Row.FindControl("selImageButton"));

        string val =Convert.ToString(rowView["fk_guid"]);
        string a = "'app_guid','" + val +  "'";

        imgbtn.Attributes.Add("OnClick",  Session[""]=val);

        }
</code></pre>

<p>As expected the code will return error on imgbtn.Attributes... but thats what the logic will do. </p>

<p>Cheers,</p>

<p>r2C3</p>
