473,509 Members | 8,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Translate ASPX page 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
4 1535
I don't know of any utilities, but the HTML and <aspx:Control> markup
should not have to change at all. One area you might have to watch for
is if anyone put VB code inline with the ASPX using <% %> blocks, or
used language specific data binding expressions (DataBinder.Eval will
work with either language).

--
Scott
http://www.OdeToCode.com/blogs/scott/

On 29 Apr 2005 07:42:16 -0700, "GMartin" <gl************@gmail.com>
wrote:
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
The page language is the language used for the actual aspx page, not the code
behind file. It's possible to have your aspx pages in C# while your code
behind files are VB (and vice versa).

Our Instant C# converter can do this for you.
Download the Demo Edition at www.instantcsharp.com

David Anton
www.tangiblesoftwaresolutions.com
Home of the Instant C# VB.NET to C# converter
and the Instant VB C# to VB.NET converter

"GMartin" wrote:
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
Just convert your classes/Codebehind to C# or vice versa
Your HTMl will work in both scenario
*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #4
Hi, David.

Do you mean that it's possible to do this :

<%@ Page language="c#" Codebehind="SimplePage.aspx.vb"
AutoEventWireup="false" Inherits="SimplePage" %>

Why would you want to do that ?
And, does it really work ? ( I've never tried it. )

In Whidbey, won't the new partial class syntax eliminate that possibility ?

<%@ Page Language="C#" CompileWith="test-difflangCS.aspx.cs"
ClassName="test_difflangCS_aspx" %>

Notice that both CompileWith and classname incorporate the page's name.
That should preclude what you're saying can be done now.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"David Anton" <Da********@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
The page language is the language used for the actual aspx page, not the code
behind file. It's possible to have your aspx pages in C# while your code
behind files are VB (and vice versa).

Our Instant C# converter can do this for you.
Download the Demo Edition at www.instantcsharp.com

David Anton
www.tangiblesoftwaresolutions.com
Home of the Instant C# VB.NET to C# converter
and the Instant VB C# to VB.NET converter

"GMartin" wrote:
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 #5

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

Similar topics

1
2014
by: shank | last post by:
I'm sure this is a stretch, but is there some kind of component that I could install to translate from English to Spanish on the fly? I have a lot of equipment features and specifications that I...
5
3914
by: Tim Marshall | last post by:
Hi folks, I'm using a web page I've found as a reference to some pet project I'm working on in Access and I'm having trouble "translating" some of the procedures to VBA. I think the stuff is in...
2
5512
by: JoRo | last post by:
I'm working on a project that needs this code in C#. Unfortunately I'm not very familiar with VB. Can anyone help translate the following into C#? Class myHyperlinkColumn Implements ITemplate...
0
2042
by: SimpleSimple | last post by:
My company has an IIS 5, ASP.net intranet site that contains documents for employee use. The files are of various types (most often Office) and are stored in blob fields in a SQL2000 database. ...
5
1643
by: craigkenisston | last post by:
Hi, I'm a bit stuck with an old piece of asp code According to the originating site, in asp it looks like : <html> <body> My Page <P> <script language=javascript
4
1357
by: Zahid | last post by:
Hi, -- URGENT -- I have a short piece of C/C++ code that i need translating into VB.Net. Any volunteers? Know of any websites that do this? Greatly appreciated. code: typedef unsigned...
6
1373
by: Dean Slindee | last post by:
This chunk of code does not translate accurately using the available C# to VB translator tools. I am wondering what the "sub within a sub" structure should look like in VB: starting with the...
3
1127
by: Craig Buchanan | last post by:
if i have a class that is declared public abstract class Hashlist : IDictionary, IEnumerable { ....} how do i translate the following (method?) into vb? IEnumerator...
2
4280
by: kevintan | last post by:
Hi all, Not sure whether you guys can help. Looking at both forms in javascript below: <html> <head> <script language="Javascript">
0
7237
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
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7416
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...
1
7073
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...
1
5062
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...
0
4732
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
779
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.