Re: Prevent auto population of title during upload

  •  02-11-2011, 9:52 PM

    Re: Prevent auto population of title during upload

    Hi VanAwful,
     
    Please try this way
     
    1. Open file D:\2005\Gallery\CuteSoft_Client\Gallery\Layout\Classic\Code.js
     
    2. Find section below
     
    var titltText=photo.Title;
     
    3. Change to
     
    var titltText=photo.Title;
        if(status=="false")
        {
          titltText  = "";
        }
     4. Text the example below
     
    1. <%@ Page Language="c#" AutoEventWireup="false" %>  
    2.   
    3. <%@ Register TagPrefix="DotNetGallery" Namespace="DotNetGallery" Assembly="DotNetGallery" %>  
    4.   
    5. <script runat="server">  
    6.     public string Status = "true";  
    7.   
    8.     protected void btnChangeStatus_Click(object sender, EventArgs e)  
    9.     {  
    10.         Status = "false";  
    11.     }  
    12. </script>  
    13.   
    14. <script>  
    15.  var status="<%= Status %>";  
    16. </script>  
    17.   
    18. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">  
    19. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">  
    20. <head>  
    21.     <title>Classic Layout - DotNetGallery</title>  
    22.     <link href="Sample.css" type="text/css" rel="stylesheet" />  
    23. </head>  
    24. <body>  
    25.     <form id="form1" runat="server">  
    26.         <asp:Button ID="btnChangeStatus" runat="server" Text="Change Status" OnClick="btnChangeStatus_Click" />  
    27.         <DotNetGallery:GalleryBrowser runat="server" ID="GalleryBrowser1" Width="780" Height="400" />  
    28.     </form>  
    29. </body>  
    30. </html> 
     
     5. Now you can hide or show the title by string "Status" at codebehind. So you can change the this value according to gallery folder name too.
     
    Regards,
     
    Ken
View Complete Thread