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

Passing parameters to a page

An unbelievably simple question, I assume, but I can't find the answer
anywhere!

How do I access a parameter passed to my page?

Eg, I go to HTTP:..blah..Mypage.aspx?ShowAll

How do a access this, eg:

If ???=ShowAll
What is ???

Thanks
--
David Gordon-Brown
Nov 19 '05 #1
4 1159
Are you looking for an answer other than using

Request[<your property>]?

-----Original Message-----
An unbelievably simple question, I assume, but I can't find the answeranywhere!

How do I access a parameter passed to my page?

Eg, I go to HTTP:..blah..Mypage.aspx?ShowAll

How do a access this, eg:

If ???=ShowAll
What is ???

Thanks
--
David Gordon-Brown
.

Nov 19 '05 #2
the easy answer is to add a value to the querystring:

Mypage.aspx?ShowAll=1

so that it appears in the request query string collection. if you don't want
to pass a value, you will need to parse the querystring yourself.

-- bruce (sqlwork.com)

"David GB" <Da*****@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
| An unbelievably simple question, I assume, but I can't find the answer
| anywhere!
|
| How do I access a parameter passed to my page?
|
| Eg, I go to HTTP:..blah..Mypage.aspx?ShowAll
|
| How do a access this, eg:
|
| If ???=ShowAll
| What is ???
|
| Thanks
| --
| David Gordon-Brown
Nov 19 '05 #3
If Request.QueryString("ShowAll") = "1" then ...

Endif

"bruce barker" <no***********@safeco.com> wrote in message
news:e$**************@TK2MSFTNGP09.phx.gbl...
the easy answer is to add a value to the querystring:

Mypage.aspx?ShowAll=1

so that it appears in the request query string collection. if you don't
want
to pass a value, you will need to parse the querystring yourself.

-- bruce (sqlwork.com)

"David GB" <Da*****@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
| An unbelievably simple question, I assume, but I can't find the answer
| anywhere!
|
| How do I access a parameter passed to my page?
|
| Eg, I go to HTTP:..blah..Mypage.aspx?ShowAll
|
| How do a access this, eg:
|
| If ???=ShowAll
| What is ???
|
| Thanks
| --
| David Gordon-Brown

Nov 19 '05 #4
Thanks, Everyone. I still can't understand why I could find this in MSDN.
I was probably having a brain fart!

David

"Bazza Formez" wrote:
If Request.QueryString("ShowAll") = "1" then ...

Endif

"bruce barker" <no***********@safeco.com> wrote in message
news:e$**************@TK2MSFTNGP09.phx.gbl...
the easy answer is to add a value to the querystring:

Mypage.aspx?ShowAll=1

so that it appears in the request query string collection. if you don't
want
to pass a value, you will need to parse the querystring yourself.

-- bruce (sqlwork.com)

"David GB" <Da*****@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
| An unbelievably simple question, I assume, but I can't find the answer
| anywhere!
|
| How do I access a parameter passed to my page?
|
| Eg, I go to HTTP:..blah..Mypage.aspx?ShowAll
|
| How do a access this, eg:
|
| If ???=ShowAll
| What is ???
|
| Thanks
| --
| David Gordon-Brown


Nov 19 '05 #5

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

Similar topics

27
by: Oscar | last post by:
I am looking for a way to pass an ADO recordset that has been retrieved in an ASP page to another HTML-page. Is there someone who can provide me with a small sample or a link to see how this is...
3
by: Joe Bloggs | last post by:
Does anyone know if its possible to pass parameters or the values of Request.QueryString from a web page to a custom control class? I'm using a C# Web Application. For Example I have Web Page1...
3
by: Miroslav Ostojic | last post by:
Hallo people... I desperatly need help with one problem... I've got this .net web application that I need to pass some parameters from, to a payment form page some other place. My problem is...
4
by: Mike Dinnis | last post by:
Hi, I've been working through a number of turorials to try to learn more about retrieving data from a SQL database. I think i've mastered techniques where i create a sql string in the page and...
4
by: David Freeman | last post by:
Hi There! I'm just wondering if there's a way to pass parameters (as if you were passing parameters to a ASCX web control) when calling an ASPX page? e.g. MyDetailsPage.UserName = "david" ...
4
by: Ranginald | last post by:
Hi, I'm having trouble passing a parameter from my default.aspx page to my default2.aspx page. I have values from a query in a list box and the goal is to pass the "catID" from default.aspx...
1
by: rpeacock | last post by:
I am working with a page that filters my results by the parameters that I am passing in the query string. I have multiple parameters that can be applied or not depending on what the user wants to...
4
by: softwaregeek | last post by:
hi to all, I am having some problem in passing parameter..... My code looks like::: request.setAttribute("game",game);...
3
by: ajaymohank | last post by:
hello everyone..... i am ajay and i am new to php. in my project i have an option to invoke a bat file by passing parrameters and to diplay the result. i tried this code but my page got hung or...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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.