Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6593725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:43:08+00:00 2026-05-25T17:43:08+00:00

I have created a small classic asp file that I indend to call form

  • 0

I have created a small classic asp file that I indend to call form asp.net using the below. I works, but it feels wrong somehow:

Booking.BelongsToSite = file_get_contents("http://localhost:82/test2.asp?functionName=RetBTS&param=" + User.ID);

protected string file_get_contents(string fileName)
{
    string sContents = string.Empty;
    if (fileName.ToLower().IndexOf("http:") > -1)
    { // URL 
        System.Net.WebClient wc = new System.Net.WebClient();
        byte[] response = wc.DownloadData(fileName);
        sContents = System.Text.Encoding.ASCII.GetString(response);
    }
        else
        {
            // Regular Filename 
            System.IO.StreamReader sr = new System.IO.StreamReader(fileName);
            sContents = sr.ReadToEnd();
            sr.Close();
        }  
        return sContents;
    }

Can anyone see any problems with doing this?

Also is it possible to do something like the below in Classic ASP / VB script. I can’t get it to call a dynamic function name:

dim functionName, param, result
functionName = request("functionName")
param = request("param")

result = functionName(param)

Also any idea how to parse the parameters. Say if I pass the parameters in the head like “1,2,3,4”, how can I pass the into the parenthesis?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:43:09+00:00Added an answer on May 25, 2026 at 5:43 pm

    Try to use GetRef instead of Eval.

    dim functionName, param, result
    functionName = request("functionName")
    param = request("param")
    
    result = GetRef(functionName)(param)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a web site that uses classic ASP.NET caching: DataSet ds = new
I have created a small application using Microsoft .NET. I don't have problems with
I have created a small function that I'm using with the onclick event... I
I have created a small contact form creator in PHP and everything works fine
I have created a small parser in c using flex and bison. The parser
I have a program that creates a small file in the Bin directory for
I have a .Net application that dynamically creates a small HTML page and pops
On an embedded type system, I have created a Small Object Allocator that piggy
I have created an small application, in which I'm using Fluent Nhibernate. Application run
I have created a small flash CS4 project that has a few custom components

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.