Hi,
I redirect to a page in the below manner
Client.aspx?FROMDATE=" + text3 + "&TODATE=" + text4 + "&STOP=" + text24 + "&MAIL=" + text1
I came to notice that we cannot pass the character #,
if we pass the character # the characters succeeding that got truncated.
Is this ok. Or do we have some other way of sending querystrings which consists of the character #
4 1055
Hi,
I redirect to a page in the below manner
Client.aspx?FROMDATE=" + text3 + "&TODATE=" + text4 + "&STOP=" + text24 + "&MAIL=" + text1
I came to notice that we cannot pass the character #,
if we pass the character # the characters succeeding that got truncated.
Is this ok. Or do we have some other way of sending querystrings which consists of the character #
Hi,
Have you tried session object?
session object is used to pass information between web pages within an web application. It is good way to transfer complicated and large objects.
Cheers,
Balaji U
right u can not pass # in querystring but u can pass its code through url and then decode it.
Other solution is use hidden variables
The Session object is a really good idea. You could create a custom class with attributes of all the variables you need to pass with the query string, and then pass an instance of that object. Or, you could pass several strings, and they will be hidden from the user, so it is more hack-proof. You can use the session object by using:
Session["object_name"];
"object_name" can be whatever you want.
But if you do want to use query strings, use the Server.UrlEncode/Server.UrlDecode methods.
Example:
Change : -
//c# code
-
//string url = "Client.aspx?FROMDATE=" + text3;
-
//change to:
-
string url = "Client.aspx?FROMDATE=" + Server.UrlEncode(text3);
-
And on the other page, -
//c# code
-
string fromdate = Server.UrlDecode(Request.QueryString["FROMDATE"]);
-
The Session object is a really good idea. You could create a custom class with attributes of all the variables you need to pass with the query string, and then pass an instance of that object. Or, you could pass several strings, and they will be hidden from the user, so it is more hack-proof. You can use the session object by using:
Session["object_name"];
"object_name" can be whatever you want.
But if you do want to use query strings, use the Server.UrlEncode/Server.UrlDecode methods.
Example:
Change : -
//c# code
-
//string url = "Client.aspx?FROMDATE=" + text3;
-
//change to:
-
string url = "Client.aspx?FROMDATE=" + Server.UrlEncode(text3);
-
And on the other page, -
//c# code
-
string fromdate = Server.UrlDecode(Request.QueryString["FROMDATE"]);
-
Thank you all for your replies
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Robert Brown |
last post by:
suppose I have the following table:
CREATE TABLE (int level, color varchar, length int, width int, height
int)
It has the following rows
1, "RED", 8, 10, 12
2, NULL, NULL, NULL, 20...
|
by: neptune |
last post by:
At my company customers tend to change contracts in the middle of the
month. I need a query that will match 1 customer to 1 contract. If
the customer changes contracts before the 15th of the...
|
by: Thomas McK |
last post by:
Hi all,
I'm trying to make a SQL query (against a table in MS Access) where I
want to take the value of something, and check to see if the first two
letters in that value are capitalized (for...
|
by: Tony Miller |
last post by:
All
I have an aggregate query using the function Month & Year on a
datereceived field ie:
TheYear: Year()
TheMonth: Month()
These are the group by fields to give me a Count on another field by...
|
by: B. Gandhi |
last post by:
Hi friends
I have a query regarding memory allocation deallocation in C.
It is as follows:
char *path = getenv("PATH");
In this call to getenv(), where does the returned string stored?...
|
by: vidya.bhagwath |
last post by:
Hello Experts,
I am using std::string object as a member variable in one of the my
class. The same class member function operates on the std::string
object and it appends some string to that...
|
by: rsrinivasan |
last post by:
Hi,
Good Morning To All..
I have doubt in my query..
My Query is,
select * from table1,table2, table3..
where table1.field=table2.field
and...
|
by: yu_kuo |
last post by:
Is there any comparison data on perfomance difference between
std::string and c style string? Or maybe if there are source code
which could be used to measuer on different compiler/platform, in a...
|
by: julie.siebel |
last post by:
I'm working on a rather complex booking system for building European
trips, in a combination of SQL/VBScript/Javascript. There are tons of
query string variables that get passed back and forth...
|
by: abhilashcashok |
last post by:
hi guys, my prblem is that I cannot update sql query against MS ACCESS
using C#. Everytime wen i do so, i got an exception (at runtime) as
'UPDATE syntax not correct'. I don find any error in my...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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...
|
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: 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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
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...
| |