473,382 Members | 1,368 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,382 software developers and data experts.

Setting the outgoing querystring

I would like to be able to set the querystring for the URL used for a
postback (the action attribute of the form). The Form property of the page
does not give access to this property, and I do not want to set the entire
value by using the Attributes property. Is there any simple property that
can be used to add to the outgoing querystring? Thanks.

Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Aug 15 '08 #1
3 1594
"Nathan Sokalski" <ns*******@kyledavidgroup.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
I would like to be able to set the querystring for the URL used for a
postback (the action attribute of the form). The Form property of the page
does not give access to this property, and I do not want to set the entire
value by using the Attributes property. Is there any simple property that
can be used to add to the outgoing querystring? Thanks.
Is this not for an ASP Classic / ASP.NET app...?

Assuming it's ASP.NET, there's no need to to this - this isn't the way
ASP.NET postbacks work at all...

If you need to persist information from client-side to server-side so that
it is available to a postback, put it in a hidden field:
http://msdn.microsoft.com/en-us/libr...ddenfield.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 15 '08 #2
I understand that using a hidden field is a common (and normally good) way
to persist information, but here is a more detailed description of my
situation:

As a search technique, I am offering users the ability to use the
querystring. This will allow them to bookmark a specific search, as well as
simplify situations in which I create links and redirects to the page for
the purpose of displaying certain results. When a certain action is taken on
the page and it is posted back, I want the most recent search to be
displayed. I would like to only need to check one thing (in this case
QueryString) to see if I should display a specified search or the default
search. And regardless of why I am using it here, I would like to know a
simple way to add to the querystring without using string manipulation. Any
ideas?

"Mark Rae [MVP]" <ma**@markNOSPAMrae.netwrote in message
news:uN**************@TK2MSFTNGP05.phx.gbl...
"Nathan Sokalski" <ns*******@kyledavidgroup.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I would like to be able to set the querystring for the URL used for a
postback (the action attribute of the form). The Form property of the
page does not give access to this property, and I do not want to set the
entire value by using the Attributes property. Is there any simple
property that can be used to add to the outgoing querystring? Thanks.

Is this not for an ASP Classic / ASP.NET app...?

Assuming it's ASP.NET, there's no need to to this - this isn't the way
ASP.NET postbacks work at all...

If you need to persist information from client-side to server-side so that
it is available to a postback, put it in a hidden field:
http://msdn.microsoft.com/en-us/libr...ddenfield.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 15 '08 #3
"Nathan Sokalski" <ns*******@kyledavidgroup.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I would like to be able to set the querystring for the URL used for a
postback (the action attribute of the form). The Form property of the page
does not give access to this property, and I do not want to set the entire
value by using the Attributes property. Is there any simple property that
can be used to add to the outgoing querystring? Thanks.

Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Server-side buttons have the PostBackUrl property, does this help?

Jeff
Aug 15 '08 #4

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

Similar topics

12
by: Alex | last post by:
I have a question about determining if one QueryString keys exists. The idea is, if this key exists, than its presence is enough to indicate that its value is true. For example ... ...
3
by: Nobody | last post by:
Hi -- I'm developing an ASP.NET application in VS.NET and I want the startup page to read in some parameters from a querystring. But I can't figure out where to set the querystring. I thought it...
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
3
by: Reny J Joseph Thuthikattu | last post by:
Hi, If i put a month callender on a asp.net web form and specify the culture on the page directive like '<%@ Page language="c#" Culture="ar-OM"%> it will display the Month callender in arabic. ...
2
by: jeffmagill | last post by:
Hello everyone, I have what I thought was a simple script but I cant figure it out. Anyway, I want to set the selected item of a drop down list with information i am recieving from...
1
by: Chris Lincoln | last post by:
Hello, I can't quite seem to figure out this issue; it is specific to Firefox, as it works fine in IE. I have an iFrame within an aspx page that is passed a value in the query string (e.g....
3
by: keith.schincke | last post by:
I know I must be missing something basic. I am developing of Firefox 1.5 and am trying to to send a basic QUERY_STRING to a test CGI that will print the data back to the brower: I can print my...
10
by: Brad Baker | last post by:
I have an asp.net/csharp application that requires a particular variable to work properly. This variable is usually passed via a query string in the URL when the application is first run but under...
3
by: pingsheng | last post by:
Dear all, I have a form with dynamically created input fields. These fields go to next page for submitting into SQL database. The thing is all fields are the same but 4 fields. So each record...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.