如何以html格式检索数据? ASP.NET [英] How to retrieve data in html form? ASP.NET

查看:65
本文介绍了如何以html格式检索数据? ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不想使用DataControls从网格中检索数据(Gridview,...)

如何以其他方式检索它?

I don''t want to retrive data from SQL using DataControls (Gridview,...)
How i can retrieve it in another way?

推荐答案

我从你的问题中理解的是你需要访问数据库而你不想在内置控件中使用它。也许是因为你需要更精细的控制或一些自定义功能。



答案就是使用ADO.NET。请在下面找到可能有用的链接。



初学者理解ADO.NET的教程 [ ^ ]



,如果你不想放在很多代码中你自己也可以使用像Entity框架这样的ORM



绝对初学者实体框架简介 [ ^ ]
What i understood from your question is that you need to access database and you don''t want to do that using in built controls. perhaps because you need more fine grained control or some custom functionality.

The answer to this would be using ADO.NET. Please find this link below which could help.

A Beginner''s Tutorial for Understanding ADO.NET[^]

also, if you dont want to put in a lot of code yourself you can any ORM like Entity framework too

An Introduction to Entity Framework for Absolute Beginners[^]


在html中,任何控件都是表单的一部分使用元素的名称作为键发回一个值。 ASP.Net中的所有回发机制都使用它作为它们工作方式的核心。



所以对于以下输入:



In html, any control which is part of the form posts a value back using the name of the element as the key. All post back mechanisms in ASP.Net use this at the core of how they work.

So for the following input:

<input type="text" name="txtTest" value="myValue" />





你也可以找到回帖后服务器端的值:





You can also find the value on the server side here after the post back:

Request.Form["txtTest"] == "myValue"





这是每个控件使用回发将数据从html表单发送到服务器的方式。



除此之外,你必须在你的问题中提供更多关于你想要达到的目标的细节。



This is how every control uses the postback to send data from the html form to the server.

Beyond this you''ll have to provide more detail in your question about what you''re trying to achieve.


Thx 4信息..我的意思是:我想从另一个方面从数据库中检索数据,我不想使用ASP.NET数据控制(Gridview,listview,..)??
Thx 4 info.. what i mean exactly: that i wanna to retrieve data from database in anotherway,,i don''t want to use ASP.NET data conrol(Gridview,listview,..)??


这篇关于如何以html格式检索数据? ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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