Subject: Problem with Cross Page Post Back
Posted By: keaja Post Date: 10/30/2006 2:11:18 PM
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>

Reply By: dagad Reply Date: 10/31/2006 6:00:39 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'

Go to topic 51656

Return to index page 134
Return to index page 133
Return to index page 132
Return to index page 131
Return to index page 130
Return to index page 129
Return to index page 128
Return to index page 127
Return to index page 126
Return to index page 125