p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 2.0 Basics (http://p2p.wrox.com/forumdisplay.php?f=136)
-   -   Problem with Cross Page Post Back (http://p2p.wrox.com/showthread.php?t=49623)

keaja October 30th, 2006 03:11 PM

Problem with Cross Page Post Back
 
I am trying to accomplish a simple cross page post back, but I am having no luck. My textbos ends up using my else statement and displaying that it didnt work.

Everything I have seems perfect, I just dont get why it isnt it working:

Default.aspx (Page1)

<script runat="server">

        public String CurrentCompany
        {
            get
            {
                return companyBox.Text;
            }
        }

</script>

//the posting button

<asp:Button ID="notifyButton" runat="server" Text="Notify" Width="74px" CssClass="button" PostBackUrl="~/statusNotifyMngment.aspx" />


// statusNotifyMngment.aspx (Page 2)

<script runat="server">

    public void submitButton_Click(object sender, EventArgs e)
    {

        if (PreviousPage != null && PreviousPage.IsCrossPagePostBack)
        {
            notesBox.Text = PreviousPage.CurrentCompany;
        }

        else
        {
              // if previous Page is NULL just redirect us
            notesBox.Text = "Didnt Work";

        }


    }

</script>


dagad October 31st, 2006 07:00 AM

i had posted something similar to this a few months back but in vain.
u can have a look at it :-
http://p2p.wrox.com/topic.asp?TOPIC_ID=50352

if it helps u, or if it helps u in helping me then plz post again !!!

-----------------------------------------------------------------
therez nothin' as impossible, bcaz the word itself says : 'i'-'m'-'possible'


All times are GMT -4. The time now is 11:20 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.