Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed

    Post ASP.NET/VB.NET[Official Discussion Thread]

    What is asp.net?

    Quote Originally Posted by NextGen1
    ASP.Net (for all practical reasons[for the sake of this section] allows rich Website and Web Application development using Web Based Languages and allows the use of both inline and code behind VB.net
    Quote Originally Posted by Wiki
    ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language. The ASP.NET SOAP extension framework allows ASP.NET components to process SOAP messages.
    How does ASP.net benefit this section and how does ASP.net have anything to do with VB.net?

    Again, ASP.net allows you to design full online applications with the option of using VB.net code behind to design your online application or site.

    What does this mean?

    This means that just about any application you can design in the windows environment can be designed to run as a online application (with minor changes, If at all).

    Imagine taking an idea you already have or have developed and turning it into a online application that can be run from anywhere in the world on any machine.

    A Asp.net application can run

    Cross Browser

    - Internet Explorer
    - Google Chrome
    - Opera
    - Safari
    - Fire Fox
    - Others. (including User Created Browsers like Mnpeeps)

    and Cross Platform

    - Mac
    - Linux (Mandrake, Ubuntu , Kubuntu , etc. etc.)
    - Windows
    - Just about any platform


    Other Notes:

    You can developer with almost no knowledge of html at all (though trust me from experience it helps alot)

    Visual Web Developer 2008:>> is a fully visual IDE with drag and drop controls.

    Visual Web Developer Visualy Supports any Web based language( HTMl, Java, XHTML, XML,CSS etc.)

    Visual Web Developer also supports both client side and server side scripting and PHP (PHP is not visually supported).


    Why have I created and stickied this thread?

    To allow users to create and share projects that have been developed in Visual Basic yet are functional in the web environment and are cross platform.


    Rules of this thread.

    This thread can be used to:

    Ask Questions
    Post Tutorials
    Share Releases
    Or as a Discussion

    The Thread Guidelines

    All rules as already stated in this section (both coding and vb specific) are to be followed.
    This thread is only for discussing vb.net/asp.net
    If you have a release you must allow me to view and approve the release , source may be required .


    Free ASP.Net Hosting

    https://www.aspspider.com/
    https://www.codefixer.com/asp-net/tut...et-hosting.asp
    https://www.brinkster.com
    https://www.somee.com
    https://www.freeaspwebhosting.org

    Not much storage or bandwidth, but great for small projects.

    Free Domains

    https://www.******/


    Last edited by NextGen1; 04-02-2010 at 11:15 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  2. The Following 6 Users Say Thank You to NextGen1 For This Useful Post:

    Blubb1337 (04-02-2010),MJLover (04-02-2010),Mr. Lex (04-02-2010),Obama (04-02-2010),why06 (04-09-2010),[color=red]FHB[/color] (09-25-2010)

  3. #2
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Introduction to ASP.net

    Download and Install Visual Web Developer (if you have not already,download is available in post 1)

    Open Visual web Developer and follow along

    Create a New Project

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/image1-5.jpg[/IMG]

    2. Call it Hello (or whatever you would like)

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/2-3.jpg[/IMG]

    By Default (unless settings are changed by you) The starting point can look alitle confusing as you will be looking at the ASP.net source code part of the application

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/3-2.jpg[/IMG]

    ---

    Here is the same code as the image above except with some notations so you can understand alittle of what you will be working with (not that it will be needed)

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/4.jpg[/IMG]

    Note: In vb.net you set comments with " ' " , in the asp.net source code we use <!-- "Comment" -->

    ---- Moving On

    3. Click on the designer tab to view the designer part (we will try and stay away from asp.net as much as possible)

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/5.jpg[/IMG]

    Once in the designer you will feel alittle more comfortable as you will notice tremendous similarities to vb.net

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/6.jpg[/IMG]

    The next step is for you to feal alittle more comfortable in this IDE

    Right Click on the form and Click "View Code"

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/7.jpg[/IMG]

    Once you are in the code part you should even feel more comfortable with coding as this is
    what you will see

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/8.jpg[/IMG]

    - Note the similiarites ,

    Code:
    Partial Public Class _Default
        Inherits System.Web.UI.Page
    
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    
        End Sub
    
    End Class
    If this were in vb.net you would see this

    Code:
    Public Class Form1
            Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    
        End Sub
    
    End Class
    and just like in vb.net here you can add your imports

    Code:
    Imports System.IO
    Partial Public Class _Default
        Inherits System.Web.UI.Page
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        End Sub
    End Class
    Ok, let's go back to the designer part again you can do this by clicking the tab on the top that reads Default.aspx.

    Note: I will first show you how to add components and use them with vb.net (post to follow)


     


     


     



    The Most complete application MPGH will ever offer - 68%




  4. The Following 5 Users Say Thank You to NextGen1 For This Useful Post:

    MJLover (04-02-2010),Mr. Lex (04-02-2010),why06 (04-09-2010),yair (12-01-2010),Zoom (04-02-2010)

  5. #3
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Continued....

    ASP.Net allows drag and drop controls however unless the posistion and placement is specified with CSS/Styles or using tables

    Code:
    <Table>
    </tr>
    <td>
    </td>
    </tr>
    </Table>
    or Div's with manipulation

    Code:
    <Div>
    </Div>
    I personally do not use the follwing method ( I create style sheets) but for the sake of giving you the feal of VB.net , I will teach you a method (absolute posisioning)
    Absolute posistion will allow you to move a element on the form freely and drop it where you like .

    The way you do this is by

    1. Lets add the components we need for this hello world application

    - add a Div to your form, you will find it in the toolbox under the HTML Tab

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/12.jpg[/IMG]

    - Now add a textBox

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/13copy.jpg[/IMG]

    - Now Click the Manage Styles Tab

    (If you dont see the styles by the toolbox or the solutions explorer, click view then manage styles)

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/new.jpg[/IMG]

    - Once in the manage styles, give it a name

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/15.jpg[/IMG]

    (I called mine textabs so I know that style will allow me to move my textbox with absolute positioning)

    Now set the position to Absolute

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/16.jpg[/IMG]

    Now click on the textbox and click apply style in the manage styles tab

    [IMG]https://i111.photobucke*****m/albums/n121/golmor/17.jpg[/IMG]

    Now do the same for 2 buttons

    create buttononeabs and button2 abs

    double click button one and use typical vb.net coding

    Code:
    'Button 1 Click Event
    Texbox1.Text = "You clicked Button1"
    and

    Code:
    'Button 2 
    TextBox1.text = "You clicked Button2"
    press F5 and test you application.

    --- Hope this helps expand your vb.net options

    --- Use one of the above free hostings plus a free domain to set up your own web
    application

    --Note: This was just an quick example of how you cna create a web based application using VB.net as the code behind for your website.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  6. The Following 5 Users Say Thank You to NextGen1 For This Useful Post:

    MJLover (04-02-2010),Mr. Lex (04-02-2010),Obama (04-02-2010),why06 (04-09-2010),Zoom (04-02-2010)

  7. #4
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Thank you nextgen for this.

    Easy to understand.

    10/10


    Also it's loads of tutorials on youtube: https://www.youtube.com/results?searc...y=asp.net&aq=f
    Last edited by Zoom; 04-02-2010 at 01:00 PM.

  8. The Following User Says Thank You to Zoom For This Useful Post:

    NextGen1 (04-02-2010)

  9. #5
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Not a problem, My goal here is to allow members to Create applications that can be run cross platform and cross browser in a web environment without having to learn to much of the different existing web applications, this can hopefully open this section to creating web services , and learning to use databases,

    You can easily develop Forums, Portals, Online Operating Systems, anywhere you can take your imagination (just about)

    Hopefully this thread will see some unique applications.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  10. The Following User Says Thank You to NextGen1 For This Useful Post:

    Obama (04-02-2010)

  11. #6
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    awesome thinking about watching some tutorials xD

    Does any1 know a serie of asp.net tutorials?

    Thanks in advance.
    Last edited by Blubb1337; 04-02-2010 at 04:23 PM.



  12. #7
    Mr. Lex's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    9
    Thank you loads for this bro. I've been wanting to learn ASP.net and this is just the head start I need. Great job.

  13. The Following User Says Thank You to Mr. Lex For This Useful Post:

    NextGen1 (04-02-2010)

  14. #8
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Tutorials to get you started

    Microsoft's Asp.net official site is loaded with Video Tutorials.

    It pretty well organized, but they offer everything from hello world applications to creating your own web service (like Google SOAP/API/WSDL).

    My suggestion would be to take it slow, don't try creating a fully functional application in one sitting, I have been working with asp.net since Asp.net 1.0 and I know html, asp, Css, Xhtml, Dynamic languages etc. etc. (not much php ) and I still come across some things I have to look up , so start from video 1 and work your way up.

    The Official Microsoft ASP.NET Site

    Getting Started - Get Started: The Official Microsoft ASP.NET Site

    After that , You can use https://www.w3schools.com/aspnet/default.asp as a reference guide.

    Plus obviously post questions and etc. in this thread.




     


     


     



    The Most complete application MPGH will ever offer - 68%




  15. The Following User Says Thank You to NextGen1 For This Useful Post:

    Obama (04-02-2010)

  16. #9
    Obama's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    The Black house
    Posts
    22,195
    Reputation
    870
    Thanks
    6,076
    My Mood
    Cool
    You're my hero

  17. The Following User Says Thank You to Obama For This Useful Post:

    NextGen1 (04-02-2010)

  18. #10
    Invidus's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    2,167
    Reputation
    23
    Thanks
    650
    My Mood
    Bored
    Lol wouldn't it take a lot of complex code to create a forum?

  19. #11
    Mr. Lex's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    9
    My first attempt at an ASP.Net program: I.C. Productions - Powered by ******

    - Link approved by Nextgen1

    It kinda' failed, but oh well.
    Last edited by NextGen1; 04-02-2010 at 09:23 PM.

  20. #12
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Remember to pass your links to me before posting them, I will remove and delete any link that is not approved. (that is one of the guidelines lex)

    Yes, You can use error handling , you get some errors if fields are blank etc, but looks good other wise.
    Last edited by NextGen1; 04-02-2010 at 09:30 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  21. #13
    Mr. Lex's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    9
    A'ight, my bad. But yeah, I know how/where I screwed up, just too busy playing CoD: WaW to fix it at the moment.
    Thanks.

  22. #14
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Brings me to my next "Tut"

    Note: To protect MPGH.net from Java/-/Script Coding, the word Java/-/Script (as one word without symbols) is censored, so if you see asterisks like *********** then replace that with the whole word [Java/-/Script] without the characters

    --------------

    Error Handling

    Typically in Vb.net we will use Try , catch and exception and display it in a message box , in asp.net you can still use try, but msgbox is not allowed (outside of local host or IIS) , the reason for this is because there is no one sitting server side to click OK for you, and Websites are not direct server access (Dubbed Remote Arms in the Web Development industry) So how can we create a MsgBox for our errors,

    Here is what I do .

    A. I still use Try , so to handle, find, and display our errors, we will use

    [php]

    Try

    ' code
    Catch Ex as exception

    'code
    end try

    [/php]

    and normally under

    [php]
    catch ex as exception
    [/php]

    we would add

    [php]
    msgbox (ex.message)
    [/php]

    for use with online applications we will have to use ********** Alert (yes Vb.net can call Java Script )

    So lets create a new sub called msgbox2

    [php]
    Public Sub msgbox2(ByVal Msg2 As String)
    End Sub
    [/php]

    Now we can call msgbox2 (though it won't do anything because msg2 is not yet declared and there is no code)

    Next we need to add the code

    [php]

    Public Sub msgbox2(ByVal Msg2 As String)

    Dim StringB As New StringBuilder()
    Dim FO As System.Web.UI.Control

    Msg2 = Msg2.Replace("'", "\'")
    Msg2 = Msg2.Replace(Chr(34), "\" & Chr(34))
    Msg2 = Msg2.Replace(vbCrLf, "\n")
    Msg2 = "<script language=**********>alert(""" & Msg2 & """)</script>"

    StringB = New StringBuilder()
    StringB.Append(Msg2)

    For Each FO In Me.Controls
    If TypeOf FO Is HtmlForm Then
    Exit For
    End If
    Next

    FO.Controls.AddAt(FO.Controls.Count, New LiteralControl(sb.ToString()))

    End Sub
    [/php]

    Now with this code we can generate a Java Based Message Box the same way we would anywhere.

    So if you are on your local machine testing an application still use msgbox (ex.message)

    If you are testing it on a production server, use MsgBox2(ex.message)


    So after creating the above code, your trys should now look like this.

    [php]

    Try
    'Code
    Catch Ex As Exception
    Msgbox2(ex.message)
    ' Msgbox (ex.message) Commented out for easy switching between production server and local host
    End try
    [/php]

    Hope this helps
    Last edited by NextGen1; 04-02-2010 at 10:38 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  23. The Following User Says Thank You to NextGen1 For This Useful Post:

    why06 (04-09-2010)

  24. #15
    Mr. Lex's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    62
    Reputation
    10
    Thanks
    9
    That helps a lot in the long run. Thanks!

Page 1 of 2 12 LastLast

Similar Threads

  1. MPGH.net officially back?
    By Jabuuty671 in forum General
    Replies: 30
    Last Post: 01-09-2011, 08:19 AM
  2. [Official]3DMA Contest DISCUSSION THREAD
    By Lonesome Cowboy in forum Art & Graphic Design
    Replies: 18
    Last Post: 11-04-2010, 06:18 PM
  3. [E-BOOKS]Complete e-books to learn VB.NET + VB + ASP.NET
    By ♪~ ᕕ(ᐛ)ᕗ in forum Visual Basic Programming
    Replies: 24
    Last Post: 09-11-2010, 03:42 AM
  4. Video Contest Discussion Thread
    By radnomguywfq3 in forum Combat Arms Hacks & Cheats
    Replies: 78
    Last Post: 09-07-2008, 07:22 AM
  5. 100K Post Discussion Thread
    By arunforce in forum General
    Replies: 26
    Last Post: 07-18-2007, 01:26 AM

Tags for this Thread