473,386 Members | 2,078 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,386 software developers and data experts.

Request.querystring

Hello I'm a newbie to .net. and having problems posting a value to the
next page. I have this in my code behind page:

url = "BookCategories.aspx?classificationid=" &
Request.QueryString("classificationid") & ""

I go to the next page but it's not getting the classificationid. What
am I doing wrong?

Please help!

Mar 21 '07 #1
3 13533
Well, this may seem like a shocker, but have you checked to see that the
Request.QueryString("classificationid") item you're attempting to add on to
the URL actually holds a value? Try something like
Dim cid as string = Request.QueryString("classificationid")
and see if cid has "something in it".
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"nina297" wrote:
Hello I'm a newbie to .net. and having problems posting a value to the
next page. I have this in my code behind page:

url = "BookCategories.aspx?classificationid=" &
Request.QueryString("classificationid") & ""

I go to the next page but it's not getting the classificationid. What
am I doing wrong?

Please help!

Mar 21 '07 #2
Try this - - -
When the page loads , create a global (page level) variable to hold the
classificationid
Dim id as string

Then, in your page_load event -
id=Request.QueryString("classificationid")

then use the variable (id) in your string
--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com

"nina297" <ni************@ssa.govwrote in message
news:11**********************@y80g2000hsf.googlegr oups.com...
Hello I'm a newbie to .net. and having problems posting a value to the
next page. I have this in my code behind page:

url = "BookCategories.aspx?classificationid=" &
Request.QueryString("classificationid") & ""

I go to the next page but it's not getting the classificationid. What
am I doing wrong?

Please help!

Mar 21 '07 #3
On Mar 21, 2:50 pm, "David Wier" <david_w...@noSpamhotmail.comwrote:
Try this - - -
When the page loads , create a global (page level) variable to hold the
classificationid
Dim id as string

Then, in your page_load event -
id=Request.QueryString("classificationid")

then use the variable (id) in your string
--
David Wier
MVP/ASPInsiderhttp://aspnet101.comhttp://aspexpress.com

"nina297" <nina.childr...@ssa.govwrote in message

news:11**********************@y80g2000hsf.googlegr oups.com...
Hello I'm a newbie to .net. and having problems posting a value to the
next page. I have this in my code behind page:
url = "BookCategories.aspx?classificationid=" &
Request.QueryString("classificationid") & ""
I go to the next page but it's not getting the classificationid. What
am I doing wrong?
Please help!- Hide quoted text -

- Show quoted text -
Okay thanks for your help but I guess I should have told you I'm using
a bulleted List. I need to make certain the correct bullet is
selected. Can I still do it as such?

Mar 21 '07 #4

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

Similar topics

5
by: momo | last post by:
Hello Newsgroup, I want to pass a Request.Form variable to an ASP form, through the url for example lets say i have a form with a textfiled called "txtName" if i click the submit button for...
4
by: Max | last post by:
Hello. This is the first time I've posted to a newsgroup, and I do this because I'm in desperate need of help. I'm working a user management system, and when I activate a user that has registered...
5
by: Ivan | last post by:
hi, I saw some program using "request("fieldname") " instead of "request.QueryString" to get the value from URL, what's the different ?? thanks
0
by: Anders Borum | last post by:
Hello! I would like to request a new method on the XsltArgumentList class, allowing developers to check the presense of a key/value pair. If you try to add a key/value pair that has already been...
1
by: FD | last post by:
For performance reason, the follwoing code (C#) to capture all the Request collection contexts is NOT recommended: string ID = Request.QueryString; But how to Capture the individual Request...
4
by: Steve | last post by:
Hi- I'd like to set values in the QueryString if I detect that a user submits a bad value, say... ?id=333 where there is no id '333', I would like to set it to '0' for example. I tried to use...
2
by: mahsa | last post by:
Hi have have some link like thi http://x.com/Shoppingcart.aspx?pn=ps50210&qty_ps50210=1&pn=excel&qty_excel=1&pn=l4504000&qty_l4504000=1&sku=PS50210&cat=laminate&action=updat now I want to request...
4
by: Guoqi Zheng | last post by:
On my application, I need to have different action based on the pass in query string. When the query string is not presented, I try to use If request.querystring("id") ="" THEN ...... This is...
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string...
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: 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...
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
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...

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.