Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi friends,
Its a problem related with listview control of asp.net?
I want to display the data in runtime i.e through c# code in load event.
When i tried to do so it didn't work.
Also if i want to access the information of 1page to other page's Listview control then i must use query string .Please anybody tell me how to do this?
Posted
Comments
Wild-Programmer 28-May-11 3:48am    
Confused with your question. Please elaborate a bit
Ankur\m/ 28-May-11 7:29am    
When i tried to do so it didn't work.
What you tried and what didn't work? You need to add these details to your question.

OP wrote: I want to display the data in runtime i.e through c# code in load event.
ListView does have a DataSource property. Get the data and bind it to the ListView on load event. Where is the problem? Search Google and you will find many examples/tutorials on how to work with ListView control in asp.net.

OP wrote: Also if i want to access the information of 1page to other page's Listview control then i must use query string .Please anybody tell me how to do this?
No. Querystrings are used for very small and insensitive data. You can store them in session object but you need to consider the amount of data that is there.
Here is a very well described MSDN article on state management techniques in asp.net - ASP.NET State Management Overview[^]

Hope this helps!
 
Share this answer
 
sir;
if you are trying to use query string, you add to the navigation url the variable you want.
see the below link:
Passing variables between pages using QueryString[^]
 
Share this answer
 
Comments
Ankur\m/ 28-May-11 8:35am    
You cannot pass ListView value in QueryString.
Ali Al Omairi(Abu AlHassan) 28-May-11 8:51am    
ok,.. forgive my mistake!
Ankur\m/ 28-May-11 8:59am    
I think you should remove your answer as it doesn't answer the question in any way. This way the vote will also go. :thumbsup:
Ali Al Omairi(Abu AlHassan) 29-May-11 2:08am    
I don't think your comment was reasonable because I don't need to pass the listview in the query string,I just need the id to be passed through the query string. the other information will be found on the server-side.
100 :rose:

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