473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Converting ASPX pages from VB.NET to C#

Are there any significant stopping blocks from taking an ASPX Page
someone designs in VB.NET, and redoing the Code behind page to use C#?

Is the Code behind the only thing one would need to change? ...That
and the Page Language="vb" in the HTML? (Are there differences to the
way each lays out the HTML?)

I wouldn't mind some utilities, but would also like to know what's
involved in doing it manually.

Nov 19 '05 #1
2 1316
Hi Glen

I'm a newcomer to asp and .net but I understand that the code behind
principle was designed for that very reason so that the HTML and the code
are seprate so you are free to write the code in any .net supported
language. So as far as I know (in my limited experience) you would only need
to change the code behind file.

Nick

<gl************@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Are there any significant stopping blocks from taking an ASPX Page
someone designs in VB.NET, and redoing the Code behind page to use C#?

Is the Code behind the only thing one would need to change? ...That
and the Page Language="vb" in the HTML? (Are there differences to the
way each lays out the HTML?)

I wouldn't mind some utilities, but would also like to know what's
involved in doing it manually.

Nov 19 '05 #2
Hi Glenn,

Sometimes transforming VBNET code C# in code behind can lead to
unexpected results.The reason for this is that VB.NET protects the developer
from literal
strings by automagically parsing it and changing things like line feeds,
tabs, double-quotes, etc to their respective ASCII codes and then stores
them that way (AFAIK).

C# does not do this. (In C based languages, things like double quotes have
to
be escaped, much as you have seen in your code
output: --><meta name=\"generator\" content=\"microsoft visual studio
...net\"><--)

For instance, when you create a string using the line:
"The "quick" brown dog
jumped over the lazy fox."

VB.NET will parse it and convert all the \r\n (typical windows linefeed) and
double quotes for you. C# on the other hand will parse it as "The \"quick\"
brown dog\r\njumped over the lazy fox". This is because C# reads the string
literally.

HTH

Mona[Grapecity]

<gl************@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Are there any significant stopping blocks from taking an ASPX Page
someone designs in VB.NET, and redoing the Code behind page to use C#?

Is the Code behind the only thing one would need to change? ...That
and the Page Language="vb" in the HTML? (Are there differences to the
way each lays out the HTML?)

I wouldn't mind some utilities, but would also like to know what's
involved in doing it manually.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: engwar1 | last post by:
I'm a .NET newbie and am beginning the process of converting an existing personal website to .NET from classic ASP. I'm assuming I want my aspx files in the root of my site in the same place as...
7
by: RCS | last post by:
Okay, a rather 'interesting' situation has arisen at a place I work: I need to convert a database from Access to something that can be used over the web. I am currently maintaining and...
5
by: Rick Lemons | last post by:
Excuse my ignorance, but I don't understand the Inherits= parameter that gets stuffed into the @Page directive. I have several old asp sites that I maintain using Visual Interdev 6.0. I want to...
2
by: Dave | last post by:
I am converting an ASP Classic web site to an ASP.NET application and have some real basic formatting or design questions. (The classic ASP site has both code (forms) and content pages.) 1.When...
2
by: Dave | last post by:
Hi, Im considering converting a legacy application from asp to aspx (vb) - just for the purpose of learning (Im new at .net, but experienced at vbscript) What I need to get my head around, is...
4
by: jason | last post by:
i'm working on a gradual conversion of an ASP classic web site to ASP.NET. a recent body of work involves adding a new asp page to the existing site. i thought this would be a good opportunity to...
6
by: Nathan Sokalski | last post by:
I recently converted some ASP.NET 1.1 projects of mine, created with Visual Studio .NET 2003, to Web Application Projects in Visual Studio .NET 2005 so that I could use ASP.NET 2.0 (All my ASP.NET...
3
by: JJ | last post by:
I am trying to convert applications built with .net framework 1.1 to use master pages. On a couple of aspx pages, I call certain javascript functions <body onresize="blah()"....> However, now...
2
by: Les Caudle | last post by:
I've inherited a .NET 1.0 app that I'm converting to 2.0. It contains a number of .xsd files (.xsd, .xsx, .cs) which get converted to (.xsd, .xsx, .xss, .xsc, .cs, .Designer.cs). The problem...
25
by: Blasting Cap | last post by:
I keep getting errors that pop up when I am trying to convert an application from dotnet framework 1.1 to framework 2.0. The old project was saved in sourcesafe from Visual Studio 2003, and I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.