?
Solved

Use ASP Convert_URL in VB6

Posted on 2005-04-15
12
Medium Priority
?
238 Views
Last Modified: 2006-11-18
How do I use the following ASP in VB6 as a string, yet have the asp file display it as a hyperlink?

my <a href=" & <%Convert_ChatURL(' ')%> & ">chat</a> feature

in the browser source code it should read:

my <a href="http://mychatserver/index.htm">chat</a> feature

but I'm getting <a href='<%Convert_ChatURL(' ')%>'>chat</a>
0
Comment
Question by:matthersjr
  • 5
  • 4
  • 3
12 Comments
 
LVL 15

Expert Comment

by:deighc
ID: 13790219
> How do I use the following ASP in VB6 as a string

This doesn't make any sense.

Could you try explaining your problem more clearly.
0
 
LVL 6

Expert Comment

by:snavebelac
ID: 13790430
i am not exactly sure what you mean but perhaps this...

my <a href="<%=Convert_ChatURL(' ')%> & ">chat</a> feature

You need to make sure your file extension is .asp and your are running it from a compatiable server (IIS... for example).

post more code if this does not help you

C
0
 

Author Comment

by:matthersjr
ID: 13790997
I have an asp file that makes a call to a vb6 module that needs to write it as a string in the vb6 code.

strReturn = strReturn & "<a href='<%Convert_ChatURL(' ')%>'>chat</a> "
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 6

Expert Comment

by:snavebelac
ID: 13791032
Assuming Convert_ChatURKL (' ') is in your VB6 module

strReturn = strReturn & "<a href=""<%" & Convert_ChatURL(' ') & "%>"">chat</a> "

I am still not clear but that might do it...

C
0
 
LVL 15

Expert Comment

by:deighc
ID: 13791070
You can't have the ASP delimiters (ie. <% and %>) inside a string value. That doesn't make sense.

I'm not clear with what you're doing either. Is the line of code you posted coming from your ASP page or your VB .dll ??
0
 

Author Comment

by:matthersjr
ID: 13791326
dll

how would I do this in vb6?

<%Convert_ChatURL(' ')%>

0
 
LVL 15

Expert Comment

by:deighc
ID: 13791336
Convert_ChatURL() an ASP function or a function in your .dll??
0
 
LVL 6

Expert Comment

by:snavebelac
ID: 13791399
Assuming Convert_ChatURL() is returning a formatted URL then..

strReturn = strReturn & "<a href=""" & Convert_ChatURL(' ') & """>chat</a> "

For Example If Convert_ChatURL() return "http://www.google.com" then the final string out put would be

<a href="http://www.google.com">chat</a>


Are we even getting close ?

C
0
 

Author Comment

by:matthersjr
ID: 13791443
asp function
0
 
LVL 15

Accepted Solution

by:
deighc earned 1000 total points
ID: 13791484
You can't make any references to your ASP function in the .dll.
So this code in the .dll:

strReturn = strReturn & "<a href=""<%" & Convert_ChatURL(' ') & "%>"">chat</a> "

simply will not work. This will just return a string like this:

<a href="<%Convert_ChatURL(' ')%>">chat</a>

(as you stated in your first post).

You can't have a string value in ASP (ie. the output of your .dll) and execute it as ASP code. This simply isn't possible.

As I see it you have two options:

1. Move the Convert_ChatURL() function into your .dll and build up the full string there.
2. Return two string values from your .dll and append them together in conjunction with the output from Convert_ChatURL()
0
 
LVL 6

Assisted Solution

by:snavebelac
snavebelac earned 1000 total points
ID: 13791495
Assuming your dll inserts the string into an ASP script before it is processed

strReturn = strReturn & "<a href=""<%=Convert_ChatURL(' ')%>"">chat</a> "

strReturn will now be equal to

<a href="<%=Convert_ChatURL(' ')%>">chat</a>

which will work in an ASP page where Convert_ChatURL() is an ASp function with a return value.

HTH

C
0
 
LVL 15

Expert Comment

by:deighc
ID: 13791513
Actually, you have another option:

Pass the result of Convert_ChatURL() into your .dll and these use it to build up the complete string. This is probably the easiest option. You simply have to add another class property of function argument somewhere in your VB module.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month16 days, 2 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question