Click to See Complete Forum and Search --> : Transferring values from Datagrid to form


Mitsuki
May 24th, 2006, 11:11 AM
Hi ..


I need some help in this please.
I have a datagrid which has a hyperlink Colum ... I want the user when he clicks on it to transfer him to a page with details about what he pressed ..

<asp:HyperLinkColumn Text="Edit" DataNavigateUrlField="ItemNo" DataNavigateUrlFormatString="ItemsDetails.aspx?ItemNo" DataTextField="ItemNo" HeaderText="Settings"></asp:HyperLinkColumn>

This works but now what should I do in the other page to retreive the values I want from the datagrid ..?

Mitsuki
May 24th, 2006, 03:23 PM
Plz help plzzzzzzzzzzzzzzz

hunzian
May 25th, 2006, 02:20 AM
Hi....

Just Change your code a little bit....
DataNavigateUrlFormatString="ItemsDetails.aspx?ItemNo={0}"

Then the page on which you have been directed through the HyperLInk column of DataGrid, use the following code to retrive ItemNo

int itemNo = Requet.QueryString["ItemNo"];


Hope This will Help...


Bbye
Hunzian

Mitsuki
May 25th, 2006, 05:17 AM
It worked but I have a TextBox "txtItemNo" how can I make it appear in the textbox???

Plus I want 2 more things to apear too do I have to do parameters for them too?


Thank you