我想在后面的代码中使用查询字符串 [英] i want use querystring in code behind
本文介绍了我想在后面的代码中使用查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
喜。我想用数据集添加消息到表。我用sqlDatasource完成了这个,但我想用后面的代码中的数据集来做。
在sqlDatasource我使用这个查询字符串for product_id insert:
hi. i want add message to table with dataset. i done that with sqlDatasource but i want do that with dataset in code behind.
in sqlDatasource i use this query string for product_id insert:
<asp:QueryStringParameter Name="Product_id" QueryStringField="product_id" Type="Int32" />
如何在插入数据集查询中插入produc_id?
谢谢
how can i insert produc_id in insert dataset query?
thanks
推荐答案
使用以下代码行来检索查询字符串值。
Use the following line of code to retrieve querystring value.
string prodId = HttpContext.Current.Request.QueryString["product_id"];
这篇关于我想在后面的代码中使用查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文