How to connect two listview?
I am doing a project in asp.net, in that i have a listview in one page(Home.aspx) that takes the GroupID &开发者_StackOverflow中文版 GroupName from the productgrp table in database. And i have the other page named product.aspx,in that i have an another listview which have to take the values like GroupID,ProductID,Image,Description from the productmst table by comparing GroupID from the productgrp table. What i have to do is,if i click on the GroupName in the listview in Home.aspx, it have to go to product page and display that another listview as i mentioned before. what i have to do for this? Help me....
Thanks in advance
HariAs far as I understood your question, you need to carry some information from the one ASP.NET page to another one.
There are several options to do it:
You can use your Session object and persist some information there:
Session["somestring"] = somedata;
You can pass some parameters, like GroupID etc. to the new page either by GET (termed "query strings" in ASP.NET) or POST, here is an example how to do it: http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx
You can register your own routes for ASP.NET application and then dynamically generate the page link to pass your data in a RESTful way. Here is some info about it: http://msdn.microsoft.com/en-us/library/cc668201.aspx
精彩评论