Skip to content

R0mb0/Setting_url_parameters_classic_asp

Setting url parameters Classic asp

Codacy Badge

Maintenance Open Source Love svg3 MIT

Donate

setting_parameters_to_url.class.asp's avaible functions

  • Add a url parameter to the list -> Public Function add_parameter(ByVal name, ByVal parameter)
  • Remove a parameter from the list by name -> Public function remove_parameter_by_name(ByVal name)
  • Remove a parameter from the list by the parameter value -> Public function remove_parameter_by_parameter(ByVal parameter)
  • Add the parameters to a url -> Public Function set_parameters_to_url(ByVal url)
  • Get actual page URL -> Public Function get_current_url()
  • Redirect a URL to new tab -> Public Function redirect(ByVal url)

How to use

From Test.asp

  1. Initialize the class

     <%@LANGUAGE="VBSCRIPT"%>
     <!--#include file="setting_parameters_to_url.class.asp"-->
     <%
         'Initialize the class
         Dim my_parameters
         Set my_parameters = new setting_parameters_to_url
  2. Use the class

        my_parameters.add_parameter "PFM", "Impressioni_di_settembre"
        my_parameters.add_parameter "Banco", "RIP"
        my_parameters.add_parameter "Locanda_delle_fate", "Forse_le_lucciole_non_si_amano_più"
    
        Response.write "<br><br>" & my_parameters.set_parameters_to_url(my_parameters.get_current_url + "/example.asp")
    
        my_parameters.remove_parameter_by_name "Banco"
    
        Response.write "<br><br>" & my_parameters.set_parameters_to_url(my_parameters.get_current_url + "/example.asp")
    
        my_parameters.remove_parameter_by_parameter "Impressioni_di_settembre"
    
        Response.write "<br><br>" & my_parameters.set_parameters_to_url(my_parameters.get_current_url + "/example.asp")
    %>
Not made by AI

About

Tool to add parameters to a url before a redirect in Classic ASP.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project