使用Asp.net Listview控件. [英] Using Asp.net Listview control.

查看:437
本文介绍了使用Asp.net Listview控件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,
它是与asp.net的Listview控制相关的问题吗?
我想在运行时显示数据,即通过load事件中的C#代码显示数据.
当我尝试这样做时,它不起作用.
另外,如果我想访问第一页到其他页面的Listview控件的信息,那么我必须使用查询字符串.请有人告诉我该怎么做吗?

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?

推荐答案

OP写道:我想在运行时显示数据,即在加载事件中通过c#代码显示数据.
ListView确实具有DataSource属性.获取数据并将其绑定到ListView在加载事件.问题出在哪儿?搜索Google,您将在asp.net中找到许多有关如何使用ListView控件的示例/教程.

OP写道:如果我想访问另一页的Listview控件的第1页信息,那么我必须使用查询字符串.请有人告诉我该怎么做吗?
否.查询字符串用于非常小的和不敏感的数据.您可以将它们存储在会话对象中,但需要考虑其中的数据量.
这是有关ASP.NET中状态管理技术的MSDN文章,内容非常详尽- ASP.NET状态管理概述 [^ ]

希望这会有所帮助!
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!


先生;
如果您尝试使用查询字符串,则将想要的变量添加到导航URL.
请参阅以下链接:
使用QueryString在页面之间传递变量 [
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[^]


这篇关于使用Asp.net Listview控件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆