Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
CType(DetailsView1.Rows(0).Cells(1).Controls(0), TextBox).Text = "239wvc01"


The above code displays 23wvc01 into the permit field, first field, of DetailsView1.
VB
  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.
Posted
Updated 10-Jul-15 2:44am
v3

1 solution

Use,

VB
CType(DetailsView1.Rows(0).Cells(1).Controls(0), TextBox).Text =
Convert.ToString(Request.QueryString("Permit"))
 
Share this answer
 
Comments
Richard Deeming 10-Jul-15 9:05am    
The QueryString indexer already returns a String - there's no need to convert it! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900