navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Using a VB ASP script on a C# ASPX page?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Using a VB ASP script on a C# ASPX page?
Page: [1]
 
IronWill

 

Posts: 111
Joined: 3/8/2007
Status: offline

 
Using a VB ASP script on a C# ASPX page? - 7/26/2008 11:45:02   
Hello!

The title almost says it all, but here's more detail. I currently have an ASP page coded with VB, which is pulling data from another ASP(VB) page/program (over which I have no control). I have a new ASPX page coded in C#, which I need to use the above ASP VB script on. I should also mention that the script has to run at the server-side.

Here's the thing: I've tried converting the ASP VB script to C# using some of the free online conversion tools available, but it hasn't worked for me so far (if I knew more about C# I guess I could do the conversion myself, but my C#/programming study has been sidelined at the moment by my study for CIW certification). That may be due to my own stumbling around. It may also not work even if I do get it converted properly because the page/program it is pulling data from, as mentioned, is coded in VB and I'm not allowed to change that and I don't know whether a C# script can interact with a VB script like that anyway.

Can anyone suggest how I may be able to run this VB script on my C# ASP page? Can I have it in a code block within the content area of the page ("<%" and "%>") and somehow specify it there as VB, or do I need to place it in the header as a "<script>" block specified as VB, and somehow refer to that script down within the content area of my ASPX page where I need the content produced by the script to appear?

Suggestions/solutions would be most appreciated. If you need me to post code, I can do so, though I figured my question is general enough that it wasn't really necessary...

Thanks!

-_Will
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Using a VB ASP script on a C# ASPX page? - 8/15/2008 14:55:38   
Hi Will,

Don't know if you solved this but sometimes these VB.NET scripts can be built as classes, dropped into the App_Code folder, and added to the project as a Reference. It can be a little tricky sometimes but these Referenced Classes used like this should expose all the objects and methods to the C# code just like any other referenced object: dll, COM, what have you.

Did that make any sense? See, you don't put it on the page directly but build a separate .VB page with classes, put it in the App_Code folder, and add it to your project. One of the best features of the .NET framework is exactly that; being able to write portions of code in whatever language and being able to use those objects (variables, data, etc.) in any of the other languages.

Hope it helps.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to IronWill)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Using a VB ASP script on a C# ASPX page?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts