Author: jstrope | Posted on: 9/3/2009 7:56:35 AM | Views : 357

Hello everyone.  This is a weird one.  I want to display a messagebox before performing navigation, so I've added javascript to do that.  When the page posts back, it does a Response.Redirect if the user clicked OK.  This works fine for my Imagebutton.  However, when I do it with the TreeView, instead of redirecting to the desired URL, the Response.Redirect reloads the same page.
I have recreated the issue in a simplified web app, so that there is nothing else confusing the issue.  Here is the code.  Does anyone know what might cause this?
ASPX page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NavJsTester.aspx.cs" Inherits="WebSiteTester.NavJsTester" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" ...

Go to the complete details ...