?
Solved

asp.net previous page

Posted on 2011-09-26
2
Medium Priority
?
155 Views
Last Modified: 2012-05-12
TmpSelectedPolicyType parameter value came from the previous aspx that I set up.
Everything is working. and I added the code as following: Page.Items.Add("PassSelectedPolicyType",TmpSelectedPolicyType);

The purpose is to make "PassSelectedPolicyType" as public for ascx file for other purpose.

However, when the page is refresh....the parameter value is disappeared...How can I prevent that?

Thanks,


           
protected void Page_Load(object sender, EventArgs e)
    {
//=================================================================================
        if (PreviousPage != null)
        {
            string TmpSelectedPolicyType=PreviousPage.TmpSelectedPolicyType.ToString();
            string TmpGeneralLiability=PreviousPage.TmpGeneralLiabilityValue.ToString();
            string TmpAutoLiability = PreviousPage.TmpAutoLiabilityValue.ToString();
            //Name Parameter,Actual Value
            Page.Items.Add("PassSelectedPolicyType",TmpSelectedPolicyType);
            Page.Items.Add("PassSelectedGeneralLiability",TmpGeneralLiability);
            Page.Items.Add("PassSelectedAutoLiability", TmpAutoLiability);
        }
//================================================================================
     }

Open in new window

0
Comment
Question by:Webboy2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 2000 total points
ID: 36602512
Do you have the PreviousPageType directive set?

<%@ PreviousPageType VirtualPath="~/SourcePage.aspx" %>

Reference:

http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx
0
 

Author Comment

by:Webboy2008
ID: 36602536
yes
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question