Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I was looking at ASP.NET and was thinking about the old school days when I was coughing up PHP code on a notepad, and then I had a strange thought...

 

Do you folk who program in ASP.NET use a text editor or go with the GUI provided by MS (Studio .NET or that free one.. forget the name).

 

The reason I thought about this, is that I was looking at the code that the GUI editor produces, and it seems like a bunch of code you just don't need. This is one of the reasons why so many stayed away from Frontpage and the like.

 

I don't know, maybe it's just the unnatural feel that I get when toying with ASP.NET using the .NET GUI.

Gamer extraordinaire. Programmer wannabe.
  • Moderators
Posted

Yeah, for classic asp and html, I use mostly notepad, but for .net I

use the VS IDE, and I do it all in the code-behind. I never use the

designer, primarily because that's the way I learned and that's

the way I like it. :)

 

BTW, I haven't notice any additional code generated by the ide. ?

Visit...Bassic Software
  • *Experts*
Posted

I haven't done much with ASP.NET, but I don't particularly like that

forms designer thing that generates the code. It doesn't seem very

HTML-like.

 

I would download some customizable "developer's notepad" and

see if you can find an ASP.NET syntax colorer. http://www.editplus.com has

a good text editor.

Posted

BTW, I haven't notice any additional code generated by the ide. ?

 

Well, maybe it doesn't. That was more or less a question rather then a statement based off a general observation. I've looked at a few text editor based ASP.NET programs and when playing around in the IDE it just looked to me that it produced a whole lot of extra code. I should really word my sentences more carefully...

 

I would download some customizable "developer's notepad" and

see if you can find an ASP.NET syntax colorer. http://www.editplus.com has a good text editor.

 

Wow.. nice. I never noticed anything like this (and to think I scripted PHP for 2 years in all black! :eek: ). Definitely a nice find, thanks for the link.

Gamer extraordinaire. Programmer wannabe.
  • Moderators
Posted

Well, it does add some code such as default params for the

controls, but I really don't see anything wrong with that.

 

For me to use Notepad to code ASP.NET would be like stepping

back in time to JAVA or PERL or even classic ASP. Ugh to all. :(

 

BTW wyrd, were you refering to Web MAtrix ?

Visit...Bassic Software
  • *Gurus*
Posted

Using any WYSIWYG HTML editor is always going to result in _some_ extra bits added to your code, it's the nature of the beast. That's why I never use them.

 

That said, the VS.NET one is one of the best I've seen, it formats HTML nicely and inserts a minimum of useless stuff.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted

BTW wyrd, were you refering to Web MAtrix ?

 

Yeah.. that's it. Free stuff is good (if you don't have studio .NET that is, heh).

Gamer extraordinaire. Programmer wannabe.
Posted

And with Web Matrix you don't need IIS, it ships with its' own server.

 

Oh really?

 

*installs*

 

Now we're talking. :) In VS when I previewed the page, the web form controls wouldn't show up.

 

I like this much better... it doesn't seem to produce the "default" code either that VS produces...

<%@ Page Language="VB" %>
<script runat="server">

   ' Insert page code here
   '

</script>
<html>
<head>
</head>
<body>
   <form runat="server">
        <!-- Insert content here -->
   </form>
</body>
</html>

 

This is from VS for comparison...

 

Public Class WebForm1
   Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

   'This call is required by the Web Form Designer.
   <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

   End Sub

   Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
       'CODEGEN: This method call is required by the Web Form Designer
       'Do not modify it using the code editor.
       InitializeComponent()
   End Sub

#End Region

   Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       'Put user code to initialize the page here
   End Sub

End Class

 

That's not all, either.. here'd the HTML portion of it...

 

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication4.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<title>WebForm1</title>
	<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
	<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
	<meta name="vs_defaultClientScript" content="JavaScript">
	<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
	<form id="Form1" method="post" runat="server">

	</form>
</body>
</HTML>

 

Maybe it's just the old school in me, but I like the fact that the Web Matrix doesn't automatically produce a code behind file with all that code.

Gamer extraordinaire. Programmer wannabe.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...