开发者

How to connect two listview?

开发者 https://www.devze.com 2023-04-04 10:20 出处:网络
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

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

Hari


As 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:

  1. You can use your Session object and persist some information there:

    Session["somestring"] = somedata;

  2. 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

  3. 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

0

精彩评论

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