locked
Show pop-up window in login page RRS feed

  • Question

  • Hey,

    In the login page of my application, i have to chek the user credentials are valid and i have to display a pop-up wndow 'Users terms & conditions Agreement page' if the user is logging in for the first time. I have added the code to display the pop-up window, once after the authentication is succeeded. the code i wrote to call the pop-up window in the login page is

    Page.ClientScript.RegisterStartupScript(

    this.GetType(), "Terms&Conditions", "<script>return fnOpenUserAgreement();</script>", false);

    the code in the JS function is

    window.showModalDialog(

    "~/Application/UserAgreement.aspx", window

    ,

    "dialogWidth:450px;dialogHeight:400px;top:100px;left:100px;menubar:no;toolbar:no;status:no;resizable:yes;scrollbars:yes;");

    but this line is not displaying or calling the pop-up window.

    any guess?

    Thanks in advance,

    D.Vinoth

    Monday, June 14, 2010 11:55 AM

Answers

  • Hi,

    Please post asp.net related questions in http://forums.asp.net in future so that you will get fast and better response there. This forum is specific to Visual C# Language to discuss issues regarding the C# language and compiler – including things like generics, anonymous methods, etc.

    You need to remove return statement from fnOpenUserAgreement in the RegisterStartupScript statement. Your code is working if it changed as below.

     

    Page.ClientScript.RegisterStartupScript(this.GetType(), "Terms&Conditions", "<script>fnOpenUserAgreement();</script>", false);

     

    • Proposed as answer by Paras Sanghani Monday, June 14, 2010 1:21 PM
    • Marked as answer by Harry Zhu Monday, June 21, 2010 3:15 AM
    Monday, June 14, 2010 12:36 PM