如何在代码中获取QueryString [英] How to get QueryString in code behind

查看:85
本文介绍了如何在代码中获取QueryString的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是我不知道如何在代码背后使用formView QueryString。

i希望按数据集添加到表中,使用formview和sqldatasource一切正常,但代码中包含数据集后面我不知道该怎么办product_id。



Hi, my problem is I don't know how use the formView QueryString in code behind.
i want add to table by dataset, with formview and sqldatasource everything is OK, but with dataset in code behind I don't know what should i do for the "product_id".

<asp:QueryStringParameter Name="Product_id" QueryStringField="product_id" Type="Int32" />





谢谢大家。



Thanks all.

推荐答案

在代码后面写这个来获取值查询字符串字段。



Write this in code behind to get the value of query string field.

string prodId = Request.QueryString["product_id"];


这篇关于如何在代码中获取QueryString的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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