p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 14th, 2005, 01:20 PM
Authorized User
Points: 49, Level: 1
Points: 49, Level: 1 Points: 49, Level: 1 Points: 49, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: Houston, TX, USA.
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
Response.Redirect("http://www.someisp.com/webmail/newmessage.aspx")
End If %>

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

Any help would be appreciated.

Jon

Thank you,
Jon Turlington
__________________
Thank you,
Jon Turlington
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old May 14th, 2005, 10:00 PM
planoie's Avatar
Friend of Wrox
Points: 16,368, Level: 55
Points: 16,368, Level: 55 Points: 16,368, Level: 55 Points: 16,368, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 Posts
Default

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.

-Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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 01:02 PM
Optimization of ASP page with VBScript anandham VBScript 0 April 18th, 2005 06:03 AM
Converting asp/vbscript code to asp.net realgone_ ASP.NET 1.1 2 October 15th, 2004 02:10 PM
Interfacing JavaScript and VBScript in an ASP.NET chester62182 ASP.NET 1.1 1 July 30th, 2004 10:39 PM
Using quotes in VBSCript and an asp page dragonfields Classic ASP Basics 2 July 31st, 2003 11:30 AM



All times are GMT -4. The time now is 12:12 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc