Wrox Programmer Forums
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 14th, 2005, 12:20 PM
Authorized User
Join Date: May 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jturlington
Default Putting VBScript in an ASP.NET page

I have been wracking my brain for what seems like DAYS now trying to find a way to do this.

My company uses another companies webmail product to serve our customers email and we need to make a small feature upgrade and the company who created it is asking a price we just don't see as reality because it is maybe 15 lines of code tops(Let's just say it's about $100 a line).

It is ASP.NET files Written in C#. I am an ASP only guy because I am really new to programming.

Is there any way to incorporate some ASP style code into this or could someone covert my code so I can just pop it into the pages. I cannot access the code view of these files.

Here's the code as it would be written in ASP(All I know.):
' This section goes on the login page and only acts when
' it sees the mte querystring. The data querystring is
' a string that will come across like
' "mailto:someguy@someisp.com" minus the quotes.

If Request.Querystring("mte") <> "" then
startOf = InStr(Request.QueryString("data"), ":") + 1
strData = MID(Request.QueryString("data"), startOf)
Session("mte") = Request.QueryString("mte")
Session("data") = strData
end If %>

' This section goes on the first page once they login.
If Session("mte") <> "" then
End If %>

' This section goes on the new message editor where a value of TO:
' would go.
If Session("mte") <> "" then
End If

Any help would be appreciated.


Thank you,
Jon Turlington
Thank you,
Jon Turlington
Old May 14th, 2005, 09:00 PM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

If you cannot access the "code view" of the files how do you expect to be able to add in whatever it is you want to have added in? (I'm not sure what you mean by "code view", do you mean you don't have the component source code?)

If what you intend to do is to add the ASP style code into the ASPX file, you can put almost exactly what you have written write where you want to. The only thing you'll need to do is add an imports statement to the top of the ASPX file so that the visual basic functions you are using are in scope:

<%@ Imports Microsoft.VisualBasic %>

I think that's what you'll need. I use the codebehind model so I'm not used to putting imports statements in my aspx files.

Give that a try.


Similar Threads
Thread Thread Starter Forum Replies Last Post
vbscript in asp.net 2.0 ufdylan ASP.NET 2.0 Basics 3 August 14th, 2007 12:02 PM
Optimization of ASP page with VBScript anandham VBScript 0 April 18th, 2005 05:03 AM
Using quotes in VBSCript and an asp page dragonfields Classic ASP Basics 2 July 31st, 2003 10:30 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.