473,800 Members | 2,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Invalid/Missing QueryString - How to react?

Hi!

I have many pages that expect query strings. One of the first things to
do, should be to check if the values of the QueryString are valid.
But how should I react on invalid/missing QueryStrings? Somehow the page
itself should stop rendering any controls and just display an error
message. How would I achieve this? Where should that be done? What are
other possible solutions?

Thanks

Joe
Jun 25 '07 #1
2 2178
On Jun 25, 7:02 pm, Joe Kovac <Joe...@nospam. comwrote:
Hi!

I have many pages that expect query strings. One of the first things to
do, should be to check if the values of the QueryString are valid.
But how should I react on invalid/missing QueryStrings? Somehow the page
itself should stop rendering any controls and just display an error
message. How would I achieve this? Where should that be done? What are
other possible solutions?

Thanks

Joe
Hi Joe

for now i see two solution in my mind...
#1 check for querystring ... if okay proceed or redirect to a error
page saying that invalid access
#2 keep my whole contents in a panel...
check for querystring ... if okay proceed or display ...
else hide content and display a error message....
may be there are some other very smart way...

Thanks
Masudur
http://munnacs.110mb.com

Jun 25 '07 #2
Raj wrote:
Displa the error message and call Response.End()
And what if I still want to see the master page? Response.End() cancels
the processing of everything. Even the master page.

Thanks
Joe
>
"Masudur" wrote:
>On Jun 25, 7:02 pm, Joe Kovac <Joe...@nospam. comwrote:
>>Hi!

I have many pages that expect query strings. One of the first things to
do, should be to check if the values of the QueryString are valid.
But how should I react on invalid/missing QueryStrings? Somehow the page
itself should stop rendering any controls and just display an error
message. How would I achieve this? Where should that be done? What are
other possible solutions?

Thanks

Joe
Hi Joe

for now i see two solution in my mind...
#1 check for querystring ... if okay proceed or redirect to a error
page saying that invalid access
#2 keep my whole contents in a panel...
check for querystring ... if okay proceed or display ...
else hide content and display a error message....
may be there are some other very smart way...

Thanks
Masudur
http://munnacs.110mb.com

Jun 26 '07 #3

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

Similar topics

5
2438
by: Steve Drake | last post by:
All, I am trying to open a word document and get all the properties using .NET (c#), if I create the wordapp, call the correct methods I get invalid cast (see code examples), but if I create a WORD PROJECT (from C#) and use the Application (thisApplication) the word project creates, it works fine, but this is far from a acceptable work around as doing it this way means I have to trigger the code from word. This does not work (Watch...
0
1316
by: Robert Schneider | last post by:
Hello everybody, we have the following problem with our Java application: Within our app we have connection pool for JDBC connections which always should be opened. We need this since several users should be served at the same time. The app is running on a pc and is always available. But the problem is that the data base (DB2-UDB) is on a AS400 which is rebooted every night. That means that the JDBC connections become invalid. But...
1
5361
by: gane kol | last post by:
Hi I am using DES algorithm. I am getting an error message in a few cases of the querystring Error Message : Length of the data to decrypt is invalid. Error Method : System.String Decrypting(System.String) Error Line: strDecrpt = sr.ReadToEnd(); QueryString Data:
6
6524
by: sviau | last post by:
since rewriting our site from asp to asp.net, weve receveid many complaints from users stating that they get invalid urls, and cant access certain pages of our site nothing has changed in our configuration except site being written in asp.net (from classic asp). the site is behind a Linux box with Squid 2.5 is there known issues between proxies and asp.net output..maybe with viewstate? underscores in url?
0
1391
by: Brian | last post by:
I've deployed a 'URL rewriter' version of our application almost two months ago and it is working great (.NET 1.1, Win2k, IIS5). Since then, I've gotten just FOUR exceptions that look like this: The description for Event ID ( 0 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of...
9
2219
by: .Net Sports | last post by:
I get an incorrect syntax error pointing to the semicolon when I run this sql statement with a dynamic querystring (geid is primary key integer datatype): sql="SELECT firstname,lastname from general where geid = " & request.QueryString("id") & ";" ...i've tried every possible combination, obviously breaking syntax rules, and keep getting the error pointing to either the ; or the =
2
9965
by: sree reddy | last post by:
..cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls;
2
1123
by: darkcode | last post by:
I'm using the below code to pass data to an old asp page. The people at the asp server location can se the request in their logs but according to them there is no ? after .asp wich makes the asp page unable to get the querystring variables.. I did also try to set the OpenRead("") value to the full url with all the querystring values but got the same result.. why is .NET cutting away my questionmark???? myClient.Headers.Add("user-agent",...
3
3865
by: =?Utf-8?B?R1ROMTcwNzc3?= | last post by:
help, I'm trying to access a stored procedure The stored procedure works fine when run from the server) the code is below - CREATE PROCEDURE updatepricing @siteid INT, @siteid2 INT, @siteid3 INT, @siteid4 INT, @siteid5 INT, @siteid6 INT,
0
9690
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10504
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10251
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7576
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.