Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

forms asp.net

  • 12-12-2003 05:01PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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