Can I create new Category

Last post 11-30-2010, 9:42 PM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  11-29-2010, 6:38 AM 65188

    Can I create new Category

    Can I create new Category

    Thanks & Regards,

    Ameya Rane.
  •  11-29-2010, 8:31 AM 65192 in reply to 65188

    Re: Can I create new Category

    Dear raneamey,
     
    Yes, you can create new Category.
    Please follow steps:
    2. Click "Admin Console"
    3. You will can create new Category in the opend dialog.
     
    Thank you for asking
  •  11-30-2010, 5:02 AM 65203 in reply to 65192

    Re: Can I create new Category

    Instead of using admin console....can i use asp.net C# coding for that purpose and create category .....can sum way to do dat.....
    Thanks & Regards,

    Ameya Rane.
  •  11-30-2010, 9:42 PM 65211 in reply to 65203

    Re: Can I create new Category

    Hi raneamey,
     
    Please try the example below
     
    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register TagPrefix="DotNetGallery" Namespace="DotNetGallery" Assembly="DotNetGallery" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    5.   
    6. <script runat="server">  
    7.    
    8.     protected void btnCreate_Click(object sender, EventArgs e)  
    9.     {  
    10.         using (DotNetGallery.GalleryDataProvider provider = DotNetGallery.GalleryDataProvider.CreateInstance(Context, "~/GalleryFiles/"))  
    11.         {  
    12.             provider.CreateCategory(tbName.Text, tbDescription.Text, "");  
    13.   
    14.         }  
    15.   
    16.     }  
    17. </script>  
    18.   
    19. <html xmlns="http://www.w3.org/1999/xhtml">  
    20. <head runat="server">  
    21.     <title>Untitled Page</title>  
    22. </head>  
    23. <body>  
    24.     <form id="form1" runat="server">  
    25.         <div>  
    26.             <table>  
    27.                 <tr>  
    28.                     <td>  
    29.                         Category Name:  
    30.                     </td>  
    31.                     <td>  
    32.                         <asp:TextBox ID="tbName" runat="server"></asp:TextBox>  
    33.                     </td>  
    34.                 </tr>  
    35.                 <tr>  
    36.                     <td>  
    37.                         Category descriptioin:  
    38.                     </td>  
    39.                     <td>  
    40.                         <asp:TextBox runat="server" ID="tbDescription"></asp:TextBox>  
    41.                     </td>  
    42.                 </tr>  
    43.             </table>  
    44.             <asp:Button ID="btnCreate" runat="server" Text="Create Category" OnClick="btnCreate_Click" />  
    45.             <DotNetGallery:GalleryBrowser ID="galleryBrowser1" runat="server" AllowEdit="true" />  
    46.         </div>  
    47.     </form>  
    48. </body>  
    49. </html> 

     
    Regards,
     
    ken
View as RSS news feed in XML