Mokshasri

Mokshasri

  • NA
  • 31
  • 0

Accessing other page control values - ASP.NET 3.5 & C#

Dec 21 2009 11:54 AM
Hi All!
       I am using Master Page. Which has table in the form and table row:
 <tr style="width:100%;height:70%"><td>
                <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
                </asp:ContentPlaceHolder>
            </td>
        </tr>

And in the content page Page1.aspx which uses this Master Page has a text box between:
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1"></asp:Content>

I want to access this text box value that is there in Page1.aspx in another page Page2.aspx.

Can anyone help me how to achieve this?

I have tried all most all ways that I have found in google search, but nothing working for me as I am always getting the error:
*******************************************
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
*******************************************

Thanks,
Moksha.

Answers (3)