Having Problem in Posting Value from a Content Page to another Content Page within a Same Master Page


I have a Master Page which contains two Content pages named: Default.aspx and Default2.aspx. I want to post a TextBox1 value (in Default.aspx) to Default2.aspx in the Master Pages and all my pages are in ContentPlaceHolder, but it is not working.


Is there Any kind of help?

12/30/2008 4:27:42 AM
asp.net.navigation-controls 13714 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 21
Get it on Google Play
Get it on Apple App Store


you can pass value between two web forms by Query string, session  or by using cookie

For query string  refer : http://www.codeproject.com/KB/aspnet/QueryString.aspx


save session in default.aspx


retrieve session as

text2.text = session("t1") in page load of default2.aspx


To know about cookie refer http://www.codeproject.com/KB/aspnet/cookies_in_c_.aspx


Haresh Ambaliya

Please remember to mark as "answers" if they help. This can be beneficial to other community members.
12/30/2008 4:58:48 AM

Thanks hareshambaliya, I did do what you have suggested and now my problem is solved.


Thanks again.

12/30/2008 5:57:47 AM


Can u please mark as "Answer" it will help to other community member

Haresh Ambaliya

Please remember to mark as "answers" if they help. This can be beneficial to other community members.
12/30/2008 7:06:21 AM

Similar Artilces:

Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Why in the world am I getting this error? The solutions I have seen either don't apply or don't work.  Here is my master page code:<%@ Master Language="C#" AutoEventWireup="false" CodeFile="TechLMSMasters/MainSide.master.cs" Inherits="MainSide" %> <%@ Register TagPrefix="usercontrol" TagName="Search" Src="~/library/uc/Search.ascx" %> <%@ Register TagPrefix="usercontrol" TagName="UserName" Src="~/library/uc/UserNameDisplay.ascx" %><!DOCTYPE html PUBLI...

ERROR Content controls have to be top-level controls in a content page or a nested master page that references a master page.
This all used to work until about 5 minutes ago. Did I change something? For some reason I am now getting this error: Content controls have to be top-level controls in a content page or a nested master page that references a master page. What I have:  I have a masterpage inside of a directory. That directory is a first level directory with its own web.config file....The whole thing is protected by the web.config file above it (in the main public directory). That main public directory has a masterpage as well. I am not currently linking the two masterpages together becuase...

Error : Content controls have to be top-level controls in a content page or a nested master page that references a master page.
when I make a directory on my root, and in that directory I put a masterpage and a web form ... I get always an error : Content controls have to be top-level controls in a content page or a nested master page that references a master page.   Does somebody know what the problem is ? Is it possible you can't set a masterpage in a directory ... ?Kind Regards,Joeri Pansaerts.From Bruges, Belgium :) i've founded ... I had to nest my masterpage ...Kind Regards,Joeri Pansaerts.From Bruges, Belgium :) Hi Joeri Pansaerts, I am receiving the same error as the one posted her...

Problem to use TreeView Control in a 'content page' This Error Occur "Only Content controls are allowed directly in a content page that contains Content controls."
hi I am trying to use the TreeView Control inside the content page (Page that has a master page is a content page). On compiling the project I got the following ASP.Net runtime error: "Only Content controls are allowed directly in a content page that contains Content controls."B@b@R J Issue resolved. I was putting script tag in the content page that is not allowed. when remove the script from content page problem is resolved.B@b@R J...

Show content in both Master Page ContentPlaceholder AND Content Page Content control
I note that by default or rendering rules, when you add content/controls to the Content Page ASP:Content control matched to a Master Page ContentPlaceholder, any content/controls in the matching Master Page ContentPlaceholder is not displayed. Is there a setting that can be made to merge or show both content/controls in the Master Page ContentPlaceholder and content/controls in the matching Content Page Content control? Thanks         Don't think so. If you specify a content control in your page then whatever is in there displays and anything in the...

convertion from page to content page or from user control to content page
Hi, I have converted an asp.net 1.1 application to 2.0.  Now what I am looking for some enhancement.  I added a master page and now I want to add other pages as content pages. but those pages which I am converting into content have some user control. Now either I can convert those user control to content pages ( which i want to look for if it is possible),  Or I am thinking i shouldn't convert those user control to content pages cause they might be just good. So looking for some of those people opinion who have worked through this so can I get opinion here please.thanks&nb...

Passing a value from Content Page to another Content Page
Hello. I have a site master page with two ContentPlaceHolders (CPH). I have two UserControls: UC1 has a TreeView control and UC2 has a Form control that uses an ObjectDataSource. My Default page populates CPH1 with UC1 and CPH2 with UC2. The TreeView populates the way I want with no issues and the Form is bound correctly to the datasource. I would like to click on a TreeNode and have the data in the Form change to the appropriate record based on the selected node whose value is the record ID. I have studied the various tutorials on this site and have tried to implement several differen...

Change content pages of Master Page without Master Page posting back?
so Master + content pages seems like exactly what I want except that they are assembled on postbacks. I am trying to make a site where both Master and Content pages have updatepanels, and the site switches content pages (40+ content pages) without the master page refreshing. Master Pages are assembled on postbacks so I don't think simple master page will work without annoying postbacks. I tried an approach where load content pages inside an Iframe, but the content pages take too long to load becuase each content page loads its own scriptmanager. View/Multiview will probably work but dif...

Programmatically set a content pages Master page to another Master page which is nested in the original
Hello, I have a set up where I have a main masterpage that I use most of the time but occasionally I need to swtch to another masterpage which is actually nested to the main masterpage. The switch needs to happen between postbacks from one content page to another. The problem I'm having, is that it is giving me an exception that it cannot find the content place holders in in the main master page. I have overriden the OnPreInit event of the content page where I check a session variable to see if I need to load the nested page or the main page. When I try to load the page I am presented ...

Content controls are allowed only in content page that references a master page.
HiI'm getting the above error with my application.Basically I had a master file and then some page files referencing the master file.In the page files I had some ajax controls so had :<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><atlas:ScriptManager ID="ScriptManager1" runat="server"></atlas:ScriptManager>in them.but when I try adding an ajax control to the master file and putting the above code in, it shows the error messagewhy would this be?thanks!  Make sure you have prop...

CSS not accessable from content page when Master Page and Content Pages are in different folder.
I can't seem to find a solution to this problem.  I have a master page and content pages and a CSS file all in the root folder.  I have created a sub folder called News and have added a content page that references the master page in the root directory with the following: MasterPageFile="~/Default.master". The issue is that the page in the News folder is not picking up the CSS styles from the master page.  Has anybody else ran into a problem like this and was able to find a solution? Any help would be greatly appreciated? Thanks, Neeraj    N...

Using an Update Panel in a Content page of Master.page/content.page scenario
When I place an Update Panel inside a content page of a Masterpage I get the following error: Element 'UpdatePanel' is not a known element. This can occur if there is a compilation error in the Web site.  Is the Update Panel suppose to work with a content page, etc.?  Can't seem to find any Docs that talk about where the Update Panel is allowed. Warren     Well, don't you know it.  Right after I put out the original post, I then downloaded the latest release of the ajax extensions and it looks like they have fixed the problem with the update panel not working ...

How to acess the master page control value in content page
i want to acess the control which is the part of master page. i want that contol`s  value on the content page.   Friend, try to implement the logic mentioned here http://forums.asp.net/t/1272824.aspx and this one http://wiki.lessthandot.com/index.php/ASP.NET:_Access_Master_Page_controls_from_the_Content_Page Good luck!Please Don't forget to click "Mark as Answer" on the post that helped you.This can be beneficial to other community members reading the thread. Hi, You can try to refer this article:  Passing Information Between Content and Master Pages&...

Value of the control at Master page is not being set from the content page
I am trying to set the value of the control at Master Page from the child page(content page) but the value of the control at master page is not changing.."Hope its your Solution so Mark it as Answer"Ahmad SheikhMicrosoft Valuable Geekhttp://sharpcontents.blogspot.com Here is a good tutorial on doing this from scott. http://www.odetocode.com/Articles/450.aspx here is the part you are looking for I think. Protected Sub Page_Load(ByVal sender As Object, _                     &...

Web resources about - Having Problem in Posting Value from a Content Page to another Content Page within a Same Master Page - asp.net.navigation-controls

Problem novel - Wikipedia, the free encyclopedia
Working class, or proletarian novels are often also social problem novels . This was in many ways a reaction to rapid industrialization , and ...

The Fitz Files: NRL decision about Sam Burgess deal with South Sydney exposes problem with salary cap ...
Let us call the salary cap what it is: an illegal cartel between employers to limit the earning capacity of its employees.

Report claims Samsung Galaxy S7 will fix the biggest problem with the Galaxy S6
... Samsung ditched microSD support on the Galaxy S6. Well according to a new report on Monday, Samsung will fix the bigger of those two problems ...

November 2015: Unofficial Problem Bank list declines to 255 Institutions
This is an unofficial list of Problem Banks compiled only from public sources. Here is the unofficial problem bank list for November 2015. Changes ...

Acampora on problems in the market
Master technician Ralph Acampora says he has some doubts about this "fractured" market.

Here’s Obama’s Other Syrian Problem
'There was one occasion where he invited us up to Lake Geneva with his family'

New York's anti-terror reporting app could easily cause problems
New York state is understandably more anxious than ever about terrorist threats, and it's hoping that some mobile technology will bolster its ...

Can Los Angeles Solve Its Traffic Problem By Building More Roads?
The Reason Foundation publishes a Los Angeles transportation plan that embraces reality over dogma.

Family evicted, building deemed unlivable: Landlord cannot fix problems, he was murdered
... A Milwaukee family has been forced to leave their apartment. Their building has been declared unlivable. The landlord was required to fix problems ...

Icy roads causing problems for Thanksgiving travelers around Colorado Springs
Dress warm this holiday, temperatures Thursday are predicted to be colder...

Resources last updated: 11/28/2015 8:06:29 AM