2 Galleries in one aspx? One for public use and one for admin use... doesn't work

Last post 04-12-2005, 3:38 PM by Adam. 4 replies.
Sort Posts: Previous Next
  •  04-06-2005, 6:26 PM 5407

    2 Galleries in one aspx? One for public use and one for admin use... doesn't work

    Hello,
    I am trying to create a single aspx page containing 2 gallery forms: one for the public with all options turned off excpet for slideshow, and one for admin with most options turned on - both pointing to the same images folder. cool!

    WHen I run the page, the first form below my 'if' statement (user is logged in - admin) works just fine
    If I change my 'if' condition to render the second form below the else statement, the gallery renders but does not work. the browser says 'error on page'.

    Why is it doing this?
    Help is much appreciated.
    Some sample code:
      <% If sLogged= true then %>
        
       <form runat="server" ID="mainform1">
       <div align=center class="head"><b>&nbsp;&nbsp;&nbsp;&nbsp;Rob Hixon's Gallery</b></div><br>
       <CE:Gallery
        id="Public"
        runat="server"
        Height="300"
        Width="300"
        Column = "3"
        Row = "2"
        MaxImageWidth="1024"
        BackColor="#ffffff"
        CellPadding="5"  
        AutoResizeUploadedImages = "true"  
        CellSpacing="5"
        ForeColor="#000000"
        BorderColor="#cc0000"
        BorderStyle="solid"
        BorderWidth="0"
        CssClass="container"
        ShowThumbNailName="True" 
        ShowThumbNailSize="false" 
        ShowThumbNailDate="false" 
        ShowThumbNailDescription="true" 
        ShowEditDescription="true" 
        ShowUpload="true"
        ShowBatchBuild="true"
        ShowWindowedScreen="false"
        ShowFullScreen="false"
        ShowHelp="false"
        ShowHome="False"
        FolderPath = "~/Gallery/RobHixen"
        ></CE:Gallery>  
         </form>

      <% else %>

     <form runat="server" ID="mainform2">
        <div align=center class="head"><b>&nbsp;&nbsp;&nbsp;&nbsp;Rob Hixon's Gallery</b></div><br>
        <CE:Gallery
         id="Admin"
         runat="server"
         Height="300"
         Width="300"
         Column = "3"
         Row = "2"
         MaxImageWidth="1024"
         BackColor="#ffffff"
         CellPadding="5"  
         AutoResizeUploadedImages = "true"  
         CellSpacing="5"
         ForeColor="#000000"
         BorderColor="#cc0000"
         BorderStyle="solid"
         BorderWidth="0"
         CssClass="container"
         ShowThumbNailName="True" 
         ShowThumbNailSize="false" 
         ShowThumbNailDate="false" 
         ShowThumbNailDescription="true" 
         ShowEditDescription="false" 
         ShowUpload="false"
         ShowBatchBuild="False"
         ShowWindowedScreen="false"
         ShowFullScreen="false"
         ShowHelp="false"
         ShowHome="False"
         FolderPath = "~/Gallery/RobHixen"
         ></CE:Gallery>  
          </form>

      <% end if %> 
  •  04-06-2005, 10:38 PM 5416 in reply to 5407

    Re: 2 Galleries in one aspx? One for public use and one for admin use... doesn't work

     <% If sLogged= true then 
        
         gallery1.ShowThumbNailName="True" 
         gallery1.ShowThumbNailSize="false" 
         gallery1.ShowThumbNailDate="false" 
         gallery1.ShowThumbNailDescription="true" 
         gallery1.ShowEditDescription="false" 
         gallery1.ShowUpload="false"
         gallery1.ShowBatchBuild="False"
         gallery1.ShowWindowedScreen="false"
         gallery1.ShowFullScreen="false"
         gallery1.ShowHelp="false"
         gallery1.ShowHome="False"
         gallery1. FolderPath = "~/Gallery/RobHixen"
       
      else
         gallery1.ShowThumbNailName="True" 
         gallery1.ShowThumbNailSize="false" 
         gallery1.ShowThumbNailDate="false" 
         gallery1.ShowThumbNailDescription="true" 
         gallery1.ShowEditDescription="false" 
         gallery1.ShowUpload="false"
         gallery1.ShowBatchBuild="False"
         gallery1.ShowWindowedScreen="false"
         gallery1.ShowFullScreen="false"
         gallery1.ShowHelp="false"
         gallery1.ShowHome="False"
         gallery1. FolderPath = "~/Gallery/RobHixen"

    end if

    %>
     
     <form runat="server" ID="mainform2">
        <div align=center class="head"><b>&nbsp;&nbsp;&nbsp;&nbsp;Rob Hixon's Gallery</b></div><br>
        <CE:Gallery
         id="gallery1"
         runat="server"
         Height="300"
         Width="300"
         Column = "3"
         Row = "2"
         MaxImageWidth="1024"
         BackColor="#ffffff"
         CellPadding="5"  
         AutoResizeUploadedImages = "true"  
         CellSpacing="5"
         ForeColor="#000000"
         BorderColor="#cc0000"
         BorderStyle="solid"
         BorderWidth="0"
         CssClass="container"
    ></CE:Gallery>  
          </form>

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  04-07-2005, 1:15 PM 5443 in reply to 5416

    Re: 2 Galleries in one aspx? One for public use and one for admin use... doesn't work

    Great! Thank you so much!
  •  04-07-2005, 2:29 PM 5455 in reply to 5443

    Re: 2 Galleries in one aspx? One for public use and one for admin use... doesn't work

    I spoke too soon... I've been playing with your example and no matter which properties I set for the gallery depending on the 'if' condition, the gallery always renders all the top buttons - (i.e. edit, upload, home, batch, fullscreen, etc.)
     
    I check to make sure what conidtion and properties I'm setting by doing a 'response.write'. So I know where I am in the code.
    It appears that the gallery control is not repsonding properly.
    Whats am I doing wrong?
     
    Code example:
     
    <%  If Session("Logged") = "True" then
            gallery1.ShowThumbNailName="True"
            gallery1.ShowThumbNailSize="True"
            gallery1.ShowThumbNailDate="True"
            gallery1.ShowThumbNailDescription="True"
            gallery1.ShowEditDescription="True"
            gallery1.ShowUpload="True"
            gallery1.ShowBatchBuild="True"
            gallery1.ShowWindowedScreen="false"
            gallery1.ShowFullScreen="false"
            gallery1.ShowHelp="false"
            gallery1.ShowHome="False"
            gallery1. FolderPath = "~/Gallery/Rob"
            response.write("loggedIn")
        Else
            gallery1.ShowThumbNailName="True"
            gallery1.ShowThumbNailSize="false"
            gallery1.ShowThumbNailDate="false"
            gallery1.ShowThumbNailDescription="true"
            gallery1.ShowEditDescription="false"
            gallery1.ShowUpload="false"
            gallery1.ShowBatchBuild="False"
            gallery1.ShowWindowedScreen="false"
            gallery1.ShowFullScreen="false"
            gallery1.ShowHelp="false"
            gallery1.ShowHome="False"
            gallery1. FolderPath = "~/Gallery/Rob"
            response.write("notLoggedIn")
       End If %>
       
       <div align="center"><form runat="server" ID="mainform1">
       <div align="center"><font size=3 class=Head>Rob Hixen</font></div><br>
        <CE:Gallery
          id="gallery1"
             runat="server"
             Height="300"
             Width="300"
             Column = "3"
             Row = "2"
             MaxImageWidth="1024"
             BackColor="#ffffff"
             CellPadding="5" 
             AutoResizeUploadedImages = "true" 
             CellSpacing="5"
             ForeColor="#000000"
             BorderColor="#cc0000"
             BorderStyle="solid"
             BorderWidth="0"
             CssClass="container"
             ></CE:Gallery>  
           </form></div>
  •  04-12-2005, 3:38 PM 5642 in reply to 5416

    Re: 2 Galleries in one aspx? One for public use and one for admin use... doesn't work

    <script runat="server">
     Public Sub Page_Load(sender As object, e As System.EventArgs)
     If sLogged= true then 
        
         gallery1.ShowThumbNailName="True" 
         gallery1.ShowThumbNailSize="false" 
         gallery1.ShowThumbNailDate="false" 
         gallery1.ShowThumbNailDescription="true" 
         gallery1.ShowEditDescription="false" 
         gallery1.ShowUpload="false"
         gallery1.ShowBatchBuild="False"
         gallery1.ShowWindowedScreen="false"
         gallery1.ShowFullScreen="false"
         gallery1.ShowHelp="false"
         gallery1.ShowHome="False"
         gallery1. FolderPath = "~/Gallery/RobHixen"
       
      else
         gallery1.ShowThumbNailName="True" 
         gallery1.ShowThumbNailSize="false" 
         gallery1.ShowThumbNailDate="false" 
         gallery1.ShowThumbNailDescription="true" 
         gallery1.ShowEditDescription="false" 
         gallery1.ShowUpload="false"
         gallery1.ShowBatchBuild="False"
         gallery1.ShowWindowedScreen="false"
         gallery1.ShowFullScreen="false"
         gallery1.ShowHelp="false"
         gallery1.ShowHome="False"
         gallery1. FolderPath = "~/Gallery/RobHixen"

     End If
        End Sub
    </script>

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML