如何从查询字符串获取值 [英] How to get value from querystring
本文介绍了如何从查询字符串获取值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
CType (DetailsView1.Rows( 0 )。细胞( 1 )。控件( 0 ),TextBox).Text = 239wvc01
以上代码显示23wvc01进入允许字段,第一个字段,DetailsView1。
CType (DetailsView1.Rows( 0 )。单元格( 1 )。控件( 0 ),TextBox).Text =
Request.QueryString( Permit)
但是我要做的是用上面的代码从查询字符串中获取值。
它在 DetailsView1
的permit字段中不显示任何内容。当我查看 Request.QueryString(Permit)
的值时,它显示 {048wvc01113su}
这是值我想要展示。
任何帮助都将不胜感激。
解决方案
使用,
CType (DetailsView1.Rows( 0 )。单元格( 1 )。控件( 0 ),TextBox).Text =
Convert.ToString(Request.QueryString( Permit))
CType(DetailsView1.Rows(0).Cells(1).Controls(0), TextBox).Text = "239wvc01"
The above code displays 23wvc01 into the permit field, first field, of DetailsView1.
CType(DetailsView1.Rows(0).Cells(1).Controls(0), TextBox).Text =
Request.QueryString("Permit")
But what I am trying to do is to get the value out of a querystring with the above code.
It displays nothing in the permit field of DetailsView1
. When I look at the value of Request.QueryString("Permit")
it displays {048wvc01113su}
which is the value I want to display.
Any help would be appreciated.
解决方案
Use,
CType(DetailsView1.Rows(0).Cells(1).Controls(0), TextBox).Text = Convert.ToString(Request.QueryString("Permit"))
这篇关于如何从查询字符串获取值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文