473,396 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

querystring problems

Hi

i'm scratching my head has to why is :

sQry+="type=0";
sQry+="&gender="+ this.ddlGender.SelectedValue.ToString();
sQry+="&sexuality="+this.ddlSexuality.SelectedValu e.ToString();
sQry+="&country="+this.ddlCountry.SelectedValue;
sQry+="&region="+this.ddlRegion.SelectedValue.ToSt ring();
sQry+="&age="+this.ddlAge.SelectedValue.ToString() ;
sQry+="&online="+this.chkOnline.Checked.ToString() .ToLower()=="false"?"0":"1";
sQry+="&photos="+this.chkPhotos.Checked.ToString() .ToLower()=="false"?"0":"1";
sQry+="&adult="+this.chkAdult.Checked.ToString().T oLower()=="false"?"0":"1";
Response.Redirect("search_result.aspx?"+sQry,true) ;

giving me the query string :

search_result.aspx?type=0&gender=2&sexuality=0&reg ion=0&age=0111

i'm missing the last 3 param names but values are there

i tried with a stringbuilder also and did not do better
thanks
Nov 18 '05 #1
1 1137
try:
sQry+="&online="+((this.chkOnline.Checked.ToString ().ToLower()=="false")?"0":"1");
sQry+="&photos="+((this.chkPhotos.Checked.ToString ().ToLower()=="false")?"0":"1");
sQry+="&adult="+((this.chkAdult.Checked.ToString() .ToLower()=="false"?")0":"1");
although I have to wonder about converting the value of a checkbox to a
string for boolean comparision.

why not simply:

sQry+="&online="+((this.chkOnline.Checked==false)? "0":"1");

Greg
"gh0st54" <gh*****@hotmail.com> wrote in message
news:7f**************************@posting.google.c om... Hi

i'm scratching my head has to why is :

sQry+="type=0";
sQry+="&gender="+ this.ddlGender.SelectedValue.ToString();
sQry+="&sexuality="+this.ddlSexuality.SelectedValu e.ToString();
sQry+="&country="+this.ddlCountry.SelectedValue;
sQry+="&region="+this.ddlRegion.SelectedValue.ToSt ring();
sQry+="&age="+this.ddlAge.SelectedValue.ToString() ;
sQry+="&online="+this.chkOnline.Checked.ToString() .ToLower()=="false"?"0":"1";
sQry+="&photos="+this.chkPhotos.Checked.ToString() .ToLower()=="false"?"0":"1";
sQry+="&adult="+this.chkAdult.Checked.ToString().T oLower()=="false"?"0":"1";
Response.Redirect("search_result.aspx?"+sQry,true) ;

giving me the query string :

search_result.aspx?type=0&gender=2&sexuality=0&reg ion=0&age=0111

i'm missing the last 3 param names but values are there

i tried with a stringbuilder also and did not do better
thanks

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Robb Meade | last post by:
Hi all, A recent project that I had finished and went live with no apparant problems. My client received an email from a user who mentioned that by accident they had been typing (over the...
11
by: Joey Martin | last post by:
I am passing a sql string thru my querystring for the next page to capture. example: www.xxxxxxxx.com/index.asp?str=select * from table where name like '%doe%' Passing a basic string works...
5
by: thomas | last post by:
I'm having a bit of trouble using Request.QueryString(). I want to click on the link to browse all <artist> records in an xml file begining with a particular letter. Any ideas where I'm going...
2
by: JDeats | last post by:
I have a WinForms based application that I'm launching over http (Microsoft's buzz word for this is aparently "SmartClient"). I had an issue trying to get parameters passed in through the URL that...
4
by: Steve | last post by:
Hi All, This problem is really annoying me, as I am sure there is a simple solution to it. If I try to read a querystring value in the Page_Load event and that querystring does not exist I...
4
by: Mark Goldin | last post by:
How can I pull data on the server from QueryString? In classic ASP I do Request.QueryString("valuename"). What about doing something like this in ASP.NET? Thanks
4
by: Raterus | last post by:
Howdy, Simple question, but I can't figure out how to do it. I have a a page which is called initially with a querystring. After I get the querystring values, I don't need the querystring to...
2
by: RodBillett | last post by:
I have an ASP.NET web page that accepts querystring parameters. MyPage.aspx?DB=__??????????&ID=1 When I get into the page and look at Request.Querystring it shows as ...
2
by: rn5a | last post by:
Assume that an ASPX page is accessed using the following URL: http://myserver/Page1.aspx?fname=john The value of the querystring fname (which is john) can be retrieved using both...
0
by: mohaaron | last post by:
Hello all, I'm having a problem using the ReturnUrl parameter while using FormsAuthentication. If I already have some querystring parameters in the url like this. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.