Client Login Area
Main Menu
Page 1 of 2 12 LastLast
Results 1 to 15 of 24

Thread: ASP.NET News system. - VB.NET

  1. #1
    Verified Community Member
    Join Date
    March 8, 2010
    Location
    Lakewood, CO
    Posts
    700

    Default ASP.NET News system. - VB.NET

    This is not a complete system. Also I'm sure the Devs here will find a flaw in my database set up. If you do please tell me what you think it should be and I'll go back and fix it.


    Create the following set up in ms sql 2005 or later
    ID int and Primary Key with Auto Increasing
    headline text
    news_story nvarchar 2000
    story_date datetime
    Now create a new stored procedure like the following

    SET ANSI_NULLS ON
    SET QUOTED_IDENTIFIER ON
    GO


    -- ================================
    -- Created
    -- by:
    -- on: Thursday, June 10, 2010 4:05 PM
    -- Description: <Adds news to the News system>
    -- ================================
    ADD PROCEDURE dbo.News_Add
    (
    @headline text,
    @news_story nvarchar(2000)
    )
    AS
    Begin
    INSERT INTO news(headline, news_story, story_date)values(@headline, @news_story, getdate())
    End
    Not sure how else to show how to make the database. Dev fix that up to it makes more sense.

    Now in your administration create two text boxes. Have one named txtheadline and the other one as txtnews. Make sure txtnews is set to multiline. Now add a button and put this as your button click event.


    Code:
     
            Using conn As SqlConnection = "connection string here"
                Using cmd As New SqlCommand
                    conn.Open()
                    With cmd
                        .CommandType = CommandType.StoredProcedure
                        .Connection = conn
                        .CommandText = "News_Add"
    
                        .Parameters.AddWithValue("@headline", txtheadline.text)
                        .Parameters.AddWithValue("@news_story", txtnews.text)
                        count = .ExecuteNonQuery()
                       End With
                End Using
            End Using
    This is just the first part. Once I figure out how to just extract one table and not my entire database, I will upload my database in a text file for you all. Along with making a side project for the news system.

    As of right now its free to be used. Once I get it more advanced, I will be adding a license. Most likely either open source or about $5 USD for unlimited uses.

    Coming Features:
    - Add, Update, Delete News
    - Show news on home page.
    - Complete Login System with different levels such as Admin, Editor, User
    - Editable layout of how news is shown
    - Comment System
    - More to come.
    Living to Kill, Killing to Live

    Come learn more about Project NLIXD!

  2. #2
    Verified Community Member Shani's Avatar
    Join Date
    April 24, 2010
    Posts
    97

    Default

    Best of Luck with it! But keep in mind to make it template based. Do not mix up presentation(html/css) with code. I will be sharing with you here.

    There should be sections and categories for news. I once started this in php but later could not find time to continue it.

  3. #3
    Verified Community Member
    Join Date
    March 8, 2010
    Location
    Lakewood, CO
    Posts
    700

    Default

    As for the editable layout, the extent the layout will be will be changing where things go. Like where you like the date to show up. where you want the link to read more of the story is or where the link to leave a comment is. As for including it on your home page all you will be doing is just including the news.aspx page.

    As for the sections and categories, I will eventually add them. They are not my biggest concern as of right now. My biggest is the comment system. I'm going to have to look at a comment system and build off that till its all my own code so i can actually use it and either sell or have it as an open source project. Still deciding but I do know that my Venatio Project that got me start making this news system will be a pay to get the source. then pay to get my database I'm creating.
    Living to Kill, Killing to Live

    Come learn more about Project NLIXD!

  4. #4
    Verified Community Member Shani's Avatar
    Join Date
    April 24, 2010
    Posts
    97

    Default

    OK. I will give your your above news system a try and will tell you also in next post how to just extract one table and not the entire database.

  5. #5
    Verified Community Member
    Join Date
    March 8, 2010
    Location
    Lakewood, CO
    Posts
    700

    Default

    Thanks Shani, Also as you are probably more knowledgeable in SQL, could you recommend any other types to use for the database other than using "nvarchar," for I'm not sure that is the right type of data storage to use. I was just following an MS Access tutorial, and just changed it to things that i though would work.

    Also I should be getting, If i have time before my cousins wedding, A way to display the news. It won't look pretty but at least its a good think. If not today then tomorrow or monday. I wan't to get this administration area completed by the First of July, so i can totally focus on the users front end lol.
    Living to Kill, Killing to Live

    Come learn more about Project NLIXD!

  6. #6
    Verified Community Member
    Join Date
    March 8, 2010
    Location
    Lakewood, CO
    Posts
    700

    Default

    UPDATE!!! Delete works as of right now. I will update next week or two with what I have accomplished. I will also show you how to load the news into the text boxes of your asp.net page so you can load the news into text boxes to edit and update the news. The style/template will be the next update after the delete/update/edit and categories. So keep looking at this thread guys.
    Living to Kill, Killing to Live

    Come learn more about Project NLIXD!

  7. #7
    ASPnix Administration Roma's Avatar
    Join Date
    June 27, 2005
    Location
    Denver, CO
    Posts
    4,066

    Default

    That's pretty cool. Will wait for other updates.
    Roma
    Friendly ASPnix Administrator


    https://www.aspnix.com
    roma@aspnix.com



    ASPnix on Facebook

  8. #8
    Verified Community Member
    Join Date
    March 8, 2010
    Location
    Lakewood, CO
    Posts
    700

    Default

    Now, I know its open source and all, but there may be a few things added other than the update for the news system .
    Living to Kill, Killing to Live

    Come learn more about Project NLIXD!

  9. #9
    Verified Community Member Shani's Avatar
    Join Date
    April 24, 2010
    Posts
    97

    Default

    Quote Originally Posted by crzyone9584 View Post
    Thanks Shani, Also as you are probably more knowledgeable in SQL, could you recommend any other types to use for the database other than using "nvarchar," for I'm not sure that is the right type of data storage to use. I was just following an MS Access tutorial, and just changed it to things that i though would work.
    You should use NVARCHAR anytime you have to store multiple languages, especially for the Asian languages.

  10. #10
    Verified Community Member
    Join Date
    March 8, 2010
    Location
    Lakewood, CO
    Posts
    700

    Default

    Another update guys. I've actually made this into an N-Tier Project. Why? Because I wanted to see if i could and see if it would still work. So this news system will be added to Sourceforge as an Open Source project that is N-Tier ASP.NET project. I will release everything I have shortly. Adding categories today, tomorrow will be getting it to display on a website. After that will most likely be the template system/design or some more code that is cleaned up. Not sure whats going to happen but Once I finish updating it all to an N-Tier Project I'll be uploading it to Scourceforge then the next update will be categories.

    Edit:

    Here is the url for sourceforge.

    https://sourceforge.net/projects/aspnetnews/
    Last edited by crzyone9584; July 12th, 2010 at 12:00 PM.
    Living to Kill, Killing to Live

    Come learn more about Project NLIXD!

  11. #11
    ASPnix Administration Roma's Avatar
    Join Date
    June 27, 2005
    Location
    Denver, CO
    Posts
    4,066

    Default

    Why sourceforge and not codeplex?
    Roma
    Friendly ASPnix Administrator


    https://www.aspnix.com
    roma@aspnix.com



    ASPnix on Facebook

  12. #12
    Verified Community Member
    Join Date
    March 8, 2010
    Location
    Lakewood, CO
    Posts
    700

    Default

    Never really used codeplex. I'll look into it. I might change over if i like codeplex more.

    Checked out codeplex. Just a tad to much work for me right now. Once i get the system a little better off and more towards it being a complete system then I'll add it to codeplex.
    Last edited by crzyone9584; July 12th, 2010 at 02:34 PM.
    Living to Kill, Killing to Live

    Come learn more about Project NLIXD!

  13. #13
    ASPnix Administration Roma's Avatar
    Join Date
    June 27, 2005
    Location
    Denver, CO
    Posts
    4,066

    Default

    Quote Originally Posted by crzyone9584 View Post
    Never really used codeplex. I'll look into it. I might change over if i like codeplex more.

    Checked out codeplex. Just a tad to much work for me right now. Once i get the system a little better off and more towards it being a complete system then I'll add it to codeplex.
    Cool. no problem. Since I'm not really a programmer, I just heard that codeplex is more Microsoft-oriented... but if sourceforge works out well for you. go for it.
    Roma
    Friendly ASPnix Administrator


    https://www.aspnix.com
    roma@aspnix.com



    ASPnix on Facebook

  14. #14
    Verified Community Member
    Join Date
    March 8, 2010
    Location
    Lakewood, CO
    Posts
    700

    Default

    Well any who, categories will be working by the end of tonight. After that will be displaying news. I'm adding things by the way of me needing them for my cms. Displaying and comments will be next. Comments will be the hardest for me though. Although it may not be. Not sure.

    Here is how the comments will work.

    There will be their own separate table. The ID of the news article will be what combines them together. So when you query the news it will show how many comments then when you read the entire news article you will have all the comments loaded by the newest first then the oldest. That way it's easier on me. Thats how my comment system for my games, along with preveiws, and reveiws will work also for my cms.
    Living to Kill, Killing to Live

    Come learn more about Project NLIXD!

  15. #15
    Verified Community Member
    Join Date
    March 8, 2010
    Location
    Lakewood, CO
    Posts
    700

    Default

    I've switched over to codeplex today for our source hosting. With this comes some updates to the source code. We have offically released the source code as Beta V 0.1. With this your able to add news, add comments to the news, view the full news article on the News.aspx page. On the main page it is limited to the first 150 or so characters. For a live demo check out

    venatio.crzyproductions.com

    The cms is using a more advance system as of right now. Most of the same abilities will be applied to the news system. To leave a comment you need an account. For secuirty reasons comments have html disabled for now. I may or may not include that in the comments portion. As for the news we have a custom plugin to handle html so your able to use html tags. This will allow you to format your posts. We are thinking of turning this system into a blogging tool in the future. We are going to be looking into themes and layouts next. This means you will be able to customize it to fit your site.

    This weekend we should have a full documentation on how it works, and how you may apply it to your site. Pictures and code examples will be in the documentation.

    Thanks the Crzy Crew

    New source location - http://crzynews.codeplex.com/
    Living to Kill, Killing to Live

    Come learn more about Project NLIXD!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •