Home > Archive > ASP .NET > April 2005 > Translate ASPX page from VB.NET to C#
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Translate ASPX page from VB.NET to C#
|
|
| GMartin 2005-04-29, 4:01 pm |
| 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.
| |
| Scott Allen 2005-04-29, 4:01 pm |
| 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" <glenn.e.martin@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.
| |
| David Anton 2005-04-30, 4:00 am |
| 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.
>
>
| |
| Patrick Olurotimi Ige 2005-04-30, 4:00 am |
| Just convert your classes/Codebehind to C# or vice versa
Your HTMl will work in both scenario
*** Sent via Developersdex http://www.developersdex.com ***
| |
| Juan T. Llibre 2005-04-30, 8:59 am |
| 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" <DavidAnton@discussions.microsoft.com> wrote in message
news:2EF9492D-0D72-433E-9589-410F6055F9CF@microsoft.com...[color=darkred]
> 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:
>
|
|
|
|
|