Click here to Skip to main content
15,942,710 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

I'm developing a shopping website. My requirement is that when i click on viewdetails(link button) I want to display those
particular details in another page.

Please send this code. Thankyou.
Updated 8-Nov-11 23:45pm
jim lahey 9-Nov-11 5:42am    
Have you searched or Googled for a solution?
Tejas Vaishnav 9-Nov-11 5:43am    
provide correct tags....


I hopw you are using datalist for displaying items

that means linkbutton must in datalist control so just like below

<asp:linkbutton id="fgdfg" runat="server" commandname="viewdet" commandargument="<%#Eval("itemid")" xmlns:asp="#unknown">View Details</asp:linkbutton>

After that you've to handle that linkbutton event by using itemcommand of datalist
//under itemcommand event of datalist

By using above code you can send that item id to viewdetails aspx page

in that page you can retrieve data regarding that querystring in pageload
and display it in detailed view

I hopw you understood What I said

All the Best
Share this answer
For sending data to other page there is many ways.....

1) use a Querystring for it...
2) Session
3) Cookies

you can use any of this....

1) Query string is used when you need to pass some argument type data to other page like you need to pass any ID or name then you can pass it with use of query string like this...

and use in test.aspx page like this...
string ID = Request.QueryString["ID"].toString();[^]

2) Session is handle to store big amount of data so in your case if you create a data table in your memory for storing items which is user added to its selection and then directly you can add that data table to your session and use in your other page by converting session to data table like this....

//In Your Item Selection Page that is Items.aspx
Session["MyDataTable"] = dt;
//and then use it for displaying item in ItemSelectionView.aspx page
DataTable dt = (DataTable)Session["MyDataTable"];
//then use dt as your display control's datasource..... like this...
GridView1.DataSource = dt;

3) Or Cookie is used to store data at client side and you can also need to write data in Cookie and while displaying you need to read data from it....[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900