Re: Asp.net 2.0 and Dreamweaver



Well, technically you don't have to re-write the code. There are,
however, changes between 2.0 and 1.1, so you may have to rewrite some
code. I have not used the inline approach, i have used the code behind
model, so I am not sure if what i say next will apply. But I had some
1.1 code that i brought into a 2.0 project and tried to compile but
with errors because some of the coding techniques i used were now
obsolete, and the compiler recommended what to do instead.

So, the 1.1 to 2.0 conversion isn't guaranteed to not have any code
rewriting, but for non-obsolete code it should work fine with VS2005.
I know there is a conversion wizard that will help you convert all of
the existing code, but I believe that is for project based applications
with code-behind, but it may apply to inline files as well, I have not
tried.

Also, I think the part where it talks about the inserting of script
block and that is this: the code automatically goes into the script
block, but i believe there are 2 different views for looking at the
aspx source. One of them is HTML view which shows all of the html and
the script blocks, and then i think there is a code view, which shows
only the <script> blocks, but as i have not tried it i cannot guarantee
that's how it is.

As for the comparison to ASP, I think that is correct, depending on how
you set up your ASP page. Similar to the <script> blocks, a developer
could have just encapsulated all of the code between <% %> blocks at
the beginning of the page, and then called the sub routines and
functions throughout the page. This lead to "spaghetti code", but I
think in some aspects that still exists in .NET, even with a
code-behind model.

All in all i guess it all comes down to preference, and I guess that is
why Microsoft supports both methods, and I personally can see
advantages within each method (I admit, sometimes I get bothered having
to open the code-behind for the page).

Regards,
Darren Kopp

.