0
Hi, I don't know it is too late. Create a link button for CategoryID to act like a hyperlink and create one more bound column to store the value of the categoryID and set it invisible(hidden). Handle the DBGrid_ItemCommand event and retrieve the value of the cell[] and store it in session. You can redirect the page to the required page while the categoryId is stored in the session.
Happy programming!!
-BRK.
0
Hello Everyone,
I tried to implement the solutions you have suggested and I am getting unexpected errors.
I created a linkbutton column for categoryID using the column interface of datagrid in properties.
It created a button column with
tag and when I changed it to tag, it gave me following error
Error: tag is not defined in schema.
To my surprise even if I add OnClick="lbtnCategoryIdClick" in tag it gives me an error
"There is no OnClick event for Button".
I am not able to figure out what am I missing while adding simple Link button in Datagrid.
Please help!
Thank you all.
C_sharpKid 0
I don't think that Hyperlink fires any server side events. It just gets rendered into a
.
A way to achieve your task is to make the hyperlink to an intermediate helper page and pass the CategoryID in the URL. The intermediate page will do the communication and then redirect to the appropriate page. But my advice is to use LinkButton instead of a Hyperlink - it behaves like ordinary button, with OnCommand property etc. - just fine for your goal.