开发者

Transferring Gridview data to another page

开发者 https://www.devze.com 2022-12-13 10:10 出处:网络
I have one page (Products) that searches for products which are then displayed in a gridview. Lovely stuff.

I have one page (Products) that searches for products which are then displayed in a gridview. Lovely stuff.

I then have a second page that is essentially a feedback form (Feedback). So therefore, a person should be able to search for a product, see its details in a gridview and then click on a hyperlink taking it to the feedback page. Upon arriving at the Feedback page, the product they were previously looking at (the gridview as it was) should be visible.

What I would like to do is transfer the gridview 'as is' (i.e. on what the person has searched for) to the second feedback page.

How would I go about achieving this?

Alternatively, if you开发者_如何学编程 could think of a better method for achieving the same effect (i.e. producing a feedback scenario), I am open to ideas. I could offer the feedback in the same page but I don't think it would be aesthetically pleasing with the page layout.

Please note, I appreciate that I could add an 'edit' element to the gridview itself but this is not approriate in this current scenario.


The simplest way to do this would be to make the original form and the feedback form the same ASPX page. You would simply hide or show elements, as you wish (using the Visible property). The grid view data would be persisted via ViewData.

0

精彩评论

暂无评论...
验证码 换一张
取 消