Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Niggling QueryString Problem

Status
Not open for further replies.

arpan

Programmer
Oct 16, 2002
336
0
0
IN
An ASP page is passed the following querystring:


Now when I do a Response.Write of the name-value pairs in the querystring in this page i.e. in Contacts.asp in this way

<%
Response.Write(&quot;Name : &quot; & Request.QueryString(&quot;cname&quot;))
Response.Write(&quot;City : &quot; & Request.QueryString(&quot;ccity&quot;))
Response.Write(&quot;State : &quot; & Request.QueryString(&quot;cstate&quot;))
Response.Write(&quot;Country : &quot; & Request.QueryString(&quot;ccountry&quot;))
Response.Write(&quot;Home Phone : &quot; & Request.QueryString(&quot;chomephone&quot;))
Response.Write(&quot;Work Phone : &quot; & Request.QueryString(&quot;cworkphone&quot;))
%>

all the values gets displayed except for the city name. Why is this happening? This is driving me crazy!!!!!

Thanks,

Arpan
 
I don't see a problem with your code, check your form or entry data. Perhaps you have it named something other than ccity in your passing?
 
arpan,

Plugged your code into an asp page. Worked fine for me. I'm assuming &quot;ccity&quot; is the city name not &quot;cname&quot;. It came up mumbai. Plug in another name instead of mumbai. What do you get?


fengshui_1998
 
The most weird part is that the querystring in the URL in the Address bar in the browser shows ccity=mumbai but when I use a Response.Write, I don't get the city name!!!!! Even when I right-click the page & click Properties, there also ccity=mumbai can be seen in the querystring of the URL. I have done similar coding on numerous occassions in the past but God knows!! what's the problem???

Arpan
 
I think you'll need to post some more code, as something else has to be causing the problem. I also agree that the code above is completely correct, so must somehow be eating it.
 
longshot here, but perhaps some component you have installed is causing an issue, just try renaming CCITY to something else

other item i dont know how it happened to me but i had a similar instance to this and deleting the line and retyping it fixed it .. i'm guessing i ended up with some strange (non visible) character mid statement that was throwing t off that my font set for editing didn't show.

*shrugs*

got me on this one, if all else fails, give it a try, cant hurt [smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top