Solved

asp.net previous page

Posted on 2011-09-26
2
153 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 500 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

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!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

690 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