The .inc files are coded with VBScript for asp page. Now we have to convert those asp pages to aspx, at the same time, i have to change the VBScript code to C# code in .inc file.
Ok, what you do in asp.net in this case is you rewrite your .inc files as .cs after converting your vbscript functions over to c#. Then, when you call from your aspx code behind page, you put your converted code inside a class wrapper. When you need that
function, you call the class from code behind:
// say you name your code file oldcode and make the class named oldcode, you do it like this:
using oldcode;
Using is in this case the include command commonly seen in vbscript. However, the file must be in true C# or you could have errors so test relentlessly.
premmiley
None
0 Points
14 Posts
Convert a classic ASP app to C#.net?
May 23, 2012 01:22 PM|LINK
The .inc files are coded with VBScript for asp page. Now we have to convert those asp pages to aspx, at the same time, i have to change the VBScript code to C# code in .inc file.
How could i do this one?
pls help me
bbcompent1
All-Star
33063 Points
8516 Posts
Moderator
Re: Convert a classic ASP app to C#.net?
May 23, 2012 01:29 PM|LINK
Ok, what you do in asp.net in this case is you rewrite your .inc files as .cs after converting your vbscript functions over to c#. Then, when you call from your aspx code behind page, you put your converted code inside a class wrapper. When you need that function, you call the class from code behind:
// say you name your code file oldcode and make the class named oldcode, you do it like this:
using oldcode;
Using is in this case the include command commonly seen in vbscript. However, the file must be in true C# or you could have errors so test relentlessly.