【发布时间】:2016-07-14 09:56:07
【问题描述】:
我在网页上做了一个链接
<a href="Products.aspx?id='something'">
现在这个发送 id 到一个页面Products.aspx
我想要页面的Products.aspx.cs 文件中的这个 id 值,这样我就可以编写类似的查询
select * from Categories Where CategoryID = 'something'
【问题讨论】:
-
这只是乞求sql注入。请使用参数化的 sql 查询。 owasp.org/index.php/Query_Parameterization_Cheat_Sheet
-
我正在尝试使用的人。 Request.QueryString["id"] 但它在请求下给出了红线。比如有什么遗漏吗?
标签: c# asp.net .net visual-studio web