开发者

Two navigation occurred when I navigate to ASP.Net application, any idea why that happens?

I have two applications WPF - xBap one and ASP.Net one.

When I'm doing navigation from xBap to ASP.Net:

private void button1_Click(object sender, RoutedEventArgs e)
{
     NavigationS开发者_运维百科ervice.Navigate(new Uri("http://localhost:14496/Default.aspx", 
                                        UriKind.Absolute));
}

Two navigation is occurred in the ASP.Net application:

public partial class _Default : System.Web.UI.Page
 {
     protected void Page_Load(object sender, EventArgs e)
     {
         if (!IsPostBack)
             File.AppendAllText("C:\\log.txt", DateTime.Now.ToString() +
                            "(SessionID: " + Session.SessionID + ")" + 
                            Environment.NewLine);
     }
 }

The result in log.txt:

8/4/2011 10:45:53 AM(SessionID: jnvq2q5g0tt415hzxtdxrird)
8/4/2011 10:45:53 AM(SessionID: e0i13wsxwbpqyxtc3xrh5zcq)

This behavior causes a problem to me, any idea how to prevent that?


The environment:

Dot Net 4.0, IE 9


Check the AutoEventWireUp attribute in the Page directive.

Change it to False then run it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜