Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

asp.net previous page

Posted on 2011-09-26
2
Medium Priority
?
159 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

Independent Software Vendors: 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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

597 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