HTML and Scripting Asp.net

Discussion in 'Computers' started by Zanza, Dec 15, 2005.

  1. Zanza

    Zanza .Net-ing & PHP-ing~*
    Staff Member

    Joined:
    Jul 16, 2001
    Messages:
    4,652
    Likes Received:
    117
    I am learning various scripting languages this semester. ASP.NET is one of them..

    This may sound stupid, but where exactly should I place the asp script? And how can I view what I did? It seems no matter what I do, things appear and disappear on their own :p

    (I am using "Microsoft ASP.NET Web Matrix" if this helps..)
     
    #1
  2. BakaMattSu

    BakaMattSu ^__^
    Staff Member

    Joined:
    Feb 16, 2001
    Messages:
    4,871
    Likes Received:
    122
    The Web Matrix Project has a very good set of tutorials you can walk through on their site.

    http://www.asp.net/webmatrix/guidedtour/getstarted/intro.aspx

    Start off anywhere you like on the left hand side and you should get going in no time. A number of the samples are only presented with VB.NET code samples, but it's very easy to translate into a different language (like C#) if you prefer.

    The majority of my work is done in ASP.NET, so feel free to come back with any questions the webmatrix tutorials don't answer.
     
    #2
  3. Zanza

    Zanza .Net-ing & PHP-ing~*
    Staff Member

    Joined:
    Jul 16, 2001
    Messages:
    4,652
    Likes Received:
    117
    What if I wrote the code in notepad? In which file format should it be saved as? aspx?

    And how can I view it (since it will be as a notepad icon if it was saved as .aspx)?
     
    #3
  4. Jet

    Jet New Member

    Joined:
    Sep 8, 2005
    Messages:
    22
    Likes Received:
    5
    What do you mean how can you view it? You want to see the finished product, or you want to edit it? Unless you have Windows 2000 or XP pro, you are going to have to upload it to a server, I think. And it shouldn't matter what you wrote it in...
     
    #4
    1 person likes this.
  5. Zanza

    Zanza .Net-ing & PHP-ing~*
    Staff Member

    Joined:
    Jul 16, 2001
    Messages:
    4,652
    Likes Received:
    117
    well, I want to see the "finished product" and I am using Windows XP..
     
    #5
  6. Zanza

    Zanza .Net-ing & PHP-ing~*
    Staff Member

    Joined:
    Jul 16, 2001
    Messages:
    4,652
    Likes Received:
    117
    I uploaded my little assignment in my little website. I uploaded the .aspx file, but I can't see the textboxes and some stuff..

    Check the link

    If you click on the .aspx file:
    Firefox: The code will appear.
    Internet Explorer: alot of missing stuff..


    What I want to do is start coding my site in .aspx rather than pure html :/
     
    #6
  7. BakaMattSu

    BakaMattSu ^__^
    Staff Member

    Joined:
    Feb 16, 2001
    Messages:
    4,871
    Likes Received:
    122
    If you want to run ASP.NET applications, your host has to be set up to handle them. The server needs to be running IIS with the .NET Framework installed and the proper server extensions configured.

    See here.

    In english, your website host doesn't know what to do with a ".aspx" file, so it's serving it up as plain text.
     
    #7
  8. Zanza

    Zanza .Net-ing & PHP-ing~*
    Staff Member

    Joined:
    Jul 16, 2001
    Messages:
    4,652
    Likes Received:
    117
    Thats the problem, I want to use it outside of the server provided. The assignment was an example.

    What I am trying to say is I want to make a site using ASP.NET, upload it in my FTP and let others view it. But just like what you said, it is treated like plain text!
     
    #8
  9. BakaMattSu

    BakaMattSu ^__^
    Staff Member

    Joined:
    Feb 16, 2001
    Messages:
    4,871
    Likes Received:
    122
    You've said you have Windows XP, but you haven't confirmed if it is the Professional Edition or Home.

    If you're on professional, it's fairly easy to get some simple ASP.NET up and going. First, verify that you have IIS (Internet Information Services) installed. If you don't, jump into your Control Panel, Add/Remove Programs, Add/Remove Windows Components and install it (it's in the item labeled "Application Server"). After that, install the .NET framework on that machine.

    If you're on home, you'll have to do a bit of hacking to get IIS working. Obviously, this method is unsupported by Microsoft. It also requires a Windows 2000 Installation CD (although trial versions are supposed to work as well as the real ones). Follow the steps here at your own risk.

    Once you have a working server, you're ready to set up your App.

    Using windows explorer, navigate to the local system folder where your application resides (example: c:\projects\testApp) and right click on it. Choose "Sharing and Security". On the Web Sharing tab, click the option to "Share this folder". The Edit Alias screen will come up where you can name the Application whatever you want. Let's say I call this app "BMS". From that point on, your application should be good to go. Since I named mine BMS, I can open up a browser and put in the address http://localhost/BMS/default.aspx to access my page named "default.aspx".

    If that throws an application error, you can usually do away with it by ensuring the application has been set up as one. Bring up your IIS Manager, find your site (Mine was default, so I can find it under my local machine, Web Sites, Default Web Site). Right click on the folder and choose properties. On the directory tab, under Application settings, make sure it is identified as an app (if it is correct, there will be a button labeled "Remove". If not, there will be a create button - click on that if present) and ensure that Execute permissions are not set to "None" ("Scripts Only" should be enough). Hit OK, and browse your site again.
     
    #9
  10. Zanza

    Zanza .Net-ing & PHP-ing~*
    Staff Member

    Joined:
    Jul 16, 2001
    Messages:
    4,652
    Likes Received:
    117
    I have Windows XP - Professional. I tried thoes steps, I didn't have "Application Server" rather than IIS. It was unckecked so I checked it and clicked on next (there were others were checked as well). It asked me for some file that it needed from the CD, so I aborted.

    I already installed the ASp.NET framework, not sure if the order affects anything ^^; Should I uninstall it then reinstall it after the installment of IIS?


    I am confused and confusing people with me! ;_;
     
    #10
  11. Zanza

    Zanza .Net-ing & PHP-ing~*
    Staff Member

    Joined:
    Jul 16, 2001
    Messages:
    4,652
    Likes Received:
    117
    Here is me again..

    I am doing a small project for my family, I need a page (doesn't has to be aspx unless it is the only way); where we can dynamically manipulate the database through the page.

    For example, you see the database as a table, with the feilds at the top and the records are listed under them. We need to be able to add/modify/delete records/feilds through that page.

    The page (and the database) should be saved in like a flash memory and can be used anywhere...

    someone? BMS? :p
     
    #11

Share This Page