473,500 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to validate QueryString?


I have an ID which I pass from the QueryString["id"]. The id is integer only
and I want before performing any action to validate if the Id is valid
integet.

Jul 23 '07 #1
2 1675
sorry.. posted in csharp by mistake

"Jassim Rahma" <jr****@hotmail.comwrote in message
news:90**********************************@microsof t.com...
>
I have an ID which I pass from the QueryString["id"]. The id is integer
only and I want before performing any action to validate if the Id is
valid integet.
Jul 23 '07 #2
You could use the static TryParse method on the Int32 structure to see
if the string is an integer.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jassim Rahma" <jr****@hotmail.comwrote in message
news:A9**********************************@microsof t.com...
sorry.. posted in csharp by mistake

"Jassim Rahma" <jr****@hotmail.comwrote in message
news:90**********************************@microsof t.com...
>>
I have an ID which I pass from the QueryString["id"]. The id is integer
only and I want before performing any action to validate if the Id is
valid integet.

Jul 23 '07 #3

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

Similar topics

3
17276
by: Arpan | last post by:
A link has the following URL: <a href="Page1.asp?cname=<%= Request.QueryString("cname") %>&cadd1=<%= Request.QueryString("cadd1") %>&cadd2=<%= Request.QueryString("cadd2") %>&cplace=<%=...
4
1960
by: KathyB | last post by:
Hi. I have an hmtl page with a function to see if there are any input text boxes. If so, that means a user did not complete them (once entered, my xsl stylesheet makes them text instead of text...
19
2963
by: Pete | last post by:
I have form/select which executes a function using onchange. No problem. However, when I validate the page with a strict HTML 4.01 doctype at http://validator.w3.org, it demands either an action or...
1
6720
by: lion | last post by:
my Problem: a query string passed into a html page doesn't display correctly on a mac I am just using html and javascript (no ASP, PHP or server side scripting) This is the query string:...
4
19702
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...
12
5274
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
3116
by: Dan Sikorsky | last post by:
How can I get the Querystring passed to the Referring Page from its referrer? I don't want the querystring coming to my current page. I want the querystring that came to the referring page, so...
4
1995
by: Jassim Rahma | last post by:
I have an ID which I pass from the QueryString. The id is integer only and I want before performing any action to validate if the Id is valid integet.
1
5975
by: beebee | last post by:
Hi all. I am having a bit of difficulty: Here is what is happening: I have an application that spits out a thankyou.aspx page and i would like to pass it the querystring values it had collected...
3
2145
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...
0
7134
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
7229
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...
1
6905
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...
0
7395
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3108
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
311
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.