Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

forms asp.net

Options
  • 12-12-2003 5:01pm
    #1
    Registered Users Posts: 2,621 ✭✭✭


    Right I've got a form declared like this

    <form runat="server" visible = "false">

    I want to make visible = "true" if someone is logged in, how can I do this?


Comments

  • Registered Users Posts: 437 ✭✭Spunj


    Using ASP.NET, your whole page is actually a form. Placing other forms on it is tricky. You dont' need a seperate form; place an '<asp:panel>' on the page and put your buttons/ textboxes inside it. On page load, check if your authentication and then set the panels visible property accordingly.

    Any control with 'autopostback' set to true will cause a form submit for your page level form.


  • Registered Users Posts: 2,621 ✭✭✭GreenHell


    :) Got it working by setting the form visible = true and the labels and button inside equal to false. Funny ole language.


  • Closed Accounts Posts: 35 Boco


    Another solution could be to group the controls onto a panel or make them into a composite control and just make that invisible/visible as needed.


Advertisement