Click here to Skip to main content
13,052,714 members (64,948 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I want to enter a policy no. on the first page that i want to carry through another 5 pages of my web application. Which state management technique should be used considering low complexity? Please help as soon as possible.Thank You.
Posted 11-Oct-12 21:07pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


You can use Sesson object, That will be unique to http session.

You can use below code to store data into session.

Session["POLICYNO"] = policy_number;

Then you can access policy number in other page with below code.

int policy_number;
if(Session["POLICYNO"] != null)
   policy_number = Convert.ToInt32(Session["POLICYNO"].ToString()); 
  //You can show error message with no policy number in session

Hope this will help you.
Member 9497070 12-Oct-12 3:24am
can it give any traffic problem while uplaoding on server or should i use query string because its a very small amount of data to be carried ?
Mohd. Mukhtar 12-Oct-12 3:28am
In your case you should use session variable only, because you want to use data in multiple pages. If you use query string you need to pass data again and again in other pages and unnecessry code you need to write the other reason is query string is insecure to use.
Member 9497070 12-Oct-12 3:30am
Ok thank u
ridoy 12-Oct-12 3:34am
Mohd. Mukhtar 12-Oct-12 3:37am
Thanks :-)
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

See there are multiple options you have for transfering data from one page to another.

-View state
-Control state
-Hidden fields
-Query strings
-Application state
-Session state
-Profile Properties

For more info you can check this link[^]

Its all depend upon your requirements, each & every approch has some merits & demerits.

Check out this link[^], It explains advantages & disadvantages of each & every approch.

Transferring page values to another page[^]

If the policy no is small size data & it don't have any security concern you can go with query string option. You can encrypt the data if you have security issue.
ridoy 12-Oct-12 3:35am
Sushil Mate 12-Oct-12 4:06am
thanks ridoy.
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

As per your requirement you can use any of these solutions

1) Querystring
2) Cookies
3) ViewState
4) Form Data
5) Session
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Use Session variables. It should suffice your need.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 12 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100