Link to home
Start Free TrialLog in
Avatar of tenriquez39
tenriquez39Flag for Mexico

asked on

problem window alert java c# web form

i have a code in .net c# . it is to show a message box type, and redirect navegation to other web form (my project is with web forms) i have next code, but it don't show the message . It go directly to menu.asxc form i test...if i commente second line (response.redirect) the message is correct, and show me in the scrren but if ...two lines active don't show me teh message:  her the code:

    protected void Page_Load(object sender, EventArgs e)
    {
        string VUsus,x;
        VUsus = Session["Usuario"].ToString();
        x = ClaseValAcc.myGlobalFunction("CatAplis", VUsus);
        if (!Page.IsPostBack)
        {
            if (x == "")
            {
                Response.Write("<script>window.alert('Acceso no permitido')</script>");
                Response.Redirect("Menu.aspx");
            }
        }
    }
ASKER CERTIFIED SOLUTION
Avatar of iuconStefan
iuconStefan
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tenriquez39

ASKER

wonderfull you are great thanks allot