正确使用查询字符串... [英] proper use of query string...

查看:74
本文介绍了正确使用查询字符串...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我知道qury字符串概述是查询字符串用于将一个页面的某些值发布到另一个页面....确定它很好

现在即时创建一个CMS网站现在,我有一个名为PRODUCTS的菜单链接,现在点击这将显示所有产品的特定表格格式...现在我的观点是,当点击此产品的特定图像时,它将发布到另一个页面,它将显示大图片与该产品的技术说明,所以在URL中它显示为 http:\\www.xyz.com \产品.aspx?Id = 1234 现在我想要提示这个东西的编码..我可以在url中生成Id它会来自数据库值吗?请给我一些提示.....谢谢你

解决方案

我建​​议你从这里开始:ASP.NET教程 [ ^ ]


您好,使用datalist显示您的产品图片,datalist具有''DataKeyField''设置此属性等于您的ProductId的属性,并使用ItemCommand Event来转到产品详细信息页面。


最好使用 UrlEncode [ ^ ]。这会在传输过程中对字符串进行编码,以防止注入攻击。


okk first of all i know about qury string overview is that query string is use to post some value of one page to another page....okk its fine
now i m creating one CMS website now in that i have one menu link named PRODUCTS now click on this it will show all the products in perticular table format ...now my point is when click of perticular image of this product it will post to another page and it will show large image with technical description of this product so in URL it is shown like http:\\www.xyz.com\Products.aspx?Id=1234 now i want hint of coding for this things..how i can generate Id in url it willl come from database value ?? please give me some hints .....thank u

解决方案

I suggest you to start here: ASP.NET Tutorial[^]


Hi, Use datalist to show your product images, datalist have property that ''DataKeyField'' set this property is equal to your ProductId, and use ItemCommand Event to go to the Product details page.


Its probably best to use UrlEncode[^] with your query string. This encodes the string during transmissions and protects from injection attacks.


这篇关于正确使用查询字符串...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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