ASP

80K

Solutions

31K

Contributors

Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.

Share tech news, updates, or what's on your mind.

Sign up to Post

Oh men,
Im wondering it is a free plugin or some calendar for  an consulting room apointment
its any idea or recomendation if its for free or open source better
regards
0
[Live Webinar] The Cloud Skills Gap
LVL 4
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Hello Experts,

I inherited an ASP application, that is very messy, across multiple of domains, virtual directories, etc... I'm not even able to create a test environment, so I'm making all changes live.

Anyways, here's the situation...

On MSSQL i have a fldEnabled bit set to False

In one common.asp include, I have
Session("bolNightSeason")   = (.Fields("fldEnabled"))

Open in new window


I also tried
Session("bolNightSeason")   = CBool(.Fields("fldEnabled"))

Open in new window


Then, after including common.asp in another file,, I have
bolNightSeason = Session("bolNightSeason")
Response.Write("night = " & bolNightSeason)

Open in new window


Now the issue is in the output...

  • When I first start the browser, I see
  • night=
  • ...
  • expected as i set it to False

  • Then, if i hit Refresh I see
  • night=True
  • ...
  • How is this possible, when the field value in the db is still set it to False?

  • Refreshing remains True, but closing and re-opening the browser goes  back to ""

Can any one spot why the value is changing, or advise on how I can trace the issue?

Any help will be greatly appreciated.

Thank you.
0
Hello,

I want to add a csv file to database. There is a column in csv file called as merchant_id same as column in SQL database. I want to update the row in database if the "merchantid" exists in database or if it doesn't exist , we need to add that row from csv file .


Here  

"rs" contains all the columns of the CSV file and its values.

"rsAdd" contains all the columns of Database table(Merchants) and its values.

Set rs = GetRecordSet("C:\upload\new\" & TheNewFileName2)
    'Response.Write "No Errors"
    Set cn = Server.CreateObject("ADODB.Connection")
    cn.ConnectionString="DSN=REWC"
    cn.Open
    i = 0
		TheSql = "SELECT * FROM Merchants"
        Set rsAdd = Server.CreateObject("ADODB.RecordSet")
        rsAdd.CursorType=1
        rsAdd.LockType=3
        rsAdd.Open TheSql, cn
        
    While not rs.EOF
				
			rsAdd.AddNew            
            For Each col in rs.Fields				
                rsAdd(Replace(col.Name,"_","")) = col.Value
            Next		
			
        rsAdd.Update
        rsAdd.Move 0        
        rs.MoveNext
        i = i + 1
        If (i mod 100)=0 Or i=1 Then
            Response.Write i & ","
            If (i mod 2500) = 0 Then
                Response.Write "<br />"
            End If
        End If
    WEND
	
    rsAdd.Close
    Set rsAdd = Nothing	
	End If

Open in new window

0
Hi there,

My form has the structure shown below:
---------------------------------------------------------------------------------------------------------------------------
<form id="form1" name="form1" method="POST" action="../../Codes_my/confirmScheduling.asp">
      <table class="table table-striped">
                    <tr>
                      <th>Day/Time</th>
                      <th>Mo </th>
                      <th>Tue </th>
                      <th>Wed </th>
                      <th>Thu </th>
                      <th>Fri </th>
                      <th>Sat </th>
                    </tr>
                     <tr>
                      <th>7h30min - 8h20min</th>
                      <td><% If ... Then %>
                      <input name="hiddHorarioID" type="hidden" id="hiddHorario47" value="475_<%= ThisDay(4)%>" size="5" />
                      <button class="btn btn-primary btn-sm" type="submit">five credits</button>
                      <% Else %>
                  <% If ... Then %>
                        <button class="btn btn-info btn-xs disabled" type="submit">reserved</button>
                  <% Else %>      
                       <button class="btn btn-primary btn-xs disabled" type="submit">reserved</button>
                 <% End If %>
                 <% End If %>
                 </td>
                      <td><% If ...  Then %>
                      <input name="hiddHorarioID" type="hidden" id="hiddHorario57" value="575_<%= ThisDay(5)%>" size="5" />
                       <button class="btn btn-primary …
0
I want to remove the '-' character and any spaces ' ' from a string. I am trying to do a double replace but my syntax seems icnorrect.
This seems to work for replacing the '-' but I am not sure what the syntax will be to also remove the spaces

(Replace(a.fieldname,'-','') AS fieldnameclear)

Open in new window

0
Hi there!

The two pieces below "work together"

<input name="hiddScheduleID" type="radio" id="hiddSchedule21" value="218_<%= ThisDay(2)%>" size="5" />
<button class="btn btn-primary btn-xs" type="submit" onclick="javascript:return checkRadio()">Schedule Date</button>

That means: the user has the possibility to check the radio button and right after that, when he/she presses the button, the "action" related to the "form" considered works as expected.

My will : I would like to leave "just the button", but with the radio-button info "inside it", so that when the user presses the button, everything works the same. In other words, take out the radio button without taking out the info it stores, and put the info "inside" the button...  how should that be done?

P.S.: the javascript is for "are you sure you want to..." stuff.  Therefore this part should be kept intact, of course.

Thanks!
0
ID = "1"

ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../xgtr/blabladatabase.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnectString

RS.open "SELECT * FROM [" & Location & "] WHERE ID =' & ID & '", conn, 3, 3

Response.Write "" & Location & "<br>"
Response.Write "ID = "
Response.Write RS.fields("id").value
//also tried  Response.Write "" & ID & ""
//also tried  Response.Write "' & ID & '"
//also tried  Response.Write " & ID & "

I have form that feed this page. The  ID value and Location being passed via hidden input.  Just for testing i am defining the ID as ID=1.  Otherwise I can use ID = Request("ID").  FYI, ID is a value (key)


The Response.Write code is only to see if the data is being passed.  I can get the location to pass, but not the ID.

Please advise.
0
HI there, a while ago I was helped to create this code below:

Set Header=oConn.Execute("SELECT * FROM site_header WHERE brand_ID='"&SubDomain("sites.brand_ID")&"' AND header_live=TRUE ORDER BY RND(-10000000*TimeValue(Now())*header_ID)")
HeaderImage=Header("header_image")

Open in new window


However I am getting this error:
Microsoft VBScript compilation error '800a03ee'

Expected ')'

Response.Write("<td width="&SiteWidth&" height=300 align=center valign=bottom background="&BrandImageDir&"/"&HeaderImage&" bgcolor="&SubDomain("brand_bg-color")&" rowspan=2 style='background-size:cover;background-position:center,center'>")
------------------------------------------------------------------------------------------------------------^

Open in new window


I cannot figure out why this is the issue

help!?
0
Hi there,

My string ("texto") is always something like that:  texto = 427_7/13/2017

I mean: three digits (none zero), the "_" symbol and a date (of course as a string).

How could I extract from "texto" only the date, that is, the "7/13/2017" in this example, so that I can store this date in a certain field in a table of a database?  

Important: please take into account that the "texto" date might be (for example) texto = 427_12/13/2017 and, in this case, of course I want the extraction to be the full date, I mean, exactly 12/13/2017 .

Thanks!
fskilnik.
0
I know it's kind oldy to use ASP (active server pages) in 2017 but my customer site is built in asp and he does not want to change it.

He asked me to do a form that you can see here http://www.preventys.net/shopquizz.asp

The form is working great.

My problem is with the postback function.

When postbacked, i need the window to go to the field checked and not return to the top of the page. You can for example go to the last record in the form and check yes or no, it will reload as postback, but you will be sent to the top of the page.

here after the complete code


<form id="Form_ID" name="Form_ID" method="Post" action="<%=getsess("currenturl")%>">
            <table border="1" cellpadding="5" cellspacing="2" class="TableContact">     
                <%
                dim qConn, qDBC, qSql, qRs
                dim counter : counter = 1
                shopopendatabase qdbc
                qSQl="Select * from questionnaire order by qid ASC" 
                Set qrs = qdbc.execute(qsql)
                if not qrs.eof then
                    do while not qrs.eof
                        StrQuestionLabel(counter) = qrs("question_label")
                        StrQuestionHelp(counter) = qrs("question_help")

                        ' questions principales
                    %>
                    <tr>
                        <td align="cennter" valign="middle"><h3><%=qrs("qid")%></h3></td>
                        <td width="15" align="cennter" 

Open in new window

0
Want Experts Exchange at your fingertips?
LVL 9
Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

how to validate if the email format its ok, then do not submit

set conn=Server.CreateObject("ADODB.Connection")
'conn.Provider="Provider=SQLOLEDB"


sql="INSERT INTO comentarios (nombre, email,telefono, producto, comentario)"
sql=sql & " VALUES "
sql=sql & "('" & Request.Form("fname") & "',"
sql=sql & "'" & Request.Form("email") & "',"
sql=sql & "'" & Request.Form("telefono") & "',"
sql=sql & "'" & Request.Form("consultorio") & "',"
sql=sql & "'" & Request.Form("message") & "')"

on error resume next
conn.Execute sql,recaffected
if err<>0 then
  Response.Write("Error, Intente otro metodo de contacto!")
 Response.Write("<a href='http://www.tasasystemasasmx.com/contacaato.html'><h3>Regresar a página de contacto.</h3></a>")
else
 Response.Write("<h3>Nos pondremos en contacto lo antes posible.</h3>")
 Response.Write("<a href='http://www.totalsyssdstems.com/indicase.html'><h3>Regresar a Oncología del Bajío.</h3></a>")
  

end if
conn.close

Open in new window

0
Hi experts, I wish to read .txt on the client side, is this possible? any help please!
0
I had this question after viewing C++ COM Method with Optional Arguments.

I am trying to produce a COM object in Visual C++, where one of the methods accepts optional arguments. Below are the interface declaration, the class implementing the interface, and the implementation of the method taking an optional argument. As it stands, it compiles. But when I try to call the function from an ASP page using VBS with the supposedly optional parameter missing, I get the following error


Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: comObject.ShowFinalSql

Following code in IDL
interface IWPharma : IDispatch{
   [id(2), helpstring("method ShowFinalSql")] HRESULT ShowFinalSql([in] BSTR query, [in] BSTR cleanup);

in C++:
    STDMETHOD(ShowFinalSql)(BSTR query, BSTR cleanup) override

in VB with error:
SET comObject = CreateObject("WPharma.Main")

REM Тест #1
comObject.ShowFinalSql "CHECK_SIGNATURES 01/01/2017", ""
0
Hello All;

I have a linked Query, that when run, allows me to connect and use the connection to copy data from the LIVE DB to the LOCAL DB.

Create linked DB
sp_addlinkedserver 'NAME-THE-CONNECTION', '', 'SQLNCLI', NULL, NULL, 'Server=IP-ADDRESS-OF-SERVER', NULL
exec sp_addlinkedsrvlogin 'NAME-THE-CONNECTION', 'false', NULL, 'USERNAME', 'PASSWORD'

Open in new window


This is the script to copy data from the LIVE to the LOCAL.
insert into LocalTable (uid) select uid from [NAME-THE-CONNECTION].[LIVE-DB-NAME].[dbo].[LiveTable]

Open in new window


I can run the linked table script first in SQL Server, and then run the insert statement, and it works great.
So, my issue is this.

How would I write this to run from within an ASP page, all in one clean process?

Thanks all;
Carrzkiss
0
Hello, All.

#1: Submit a form.
#2: Have the content of the div {REFRESH} the data behind it, every 1 second, after the form submit.

I have this code to refresh if I load the page on its own, without a form click.
<script type="text/javascript">
var auto_MediaAff = setInterval(
function()
{
$('#MailID').fadeOut('slow').load('http://192.168.2.12/new_cs/add-ons/Postmaster/2.asp').fadeIn("slow");
}, 1000);
</script>

Open in new window


Any idea's on how to accomplish this after the Form Submit?

Carrzkiss
0
Hello experts, I'm trying to develop a code that can manipulate the cursor to transfer from one input text to another. The big problem is that the input text that i have is in the table. The Table is made thru insertRow. Therfore, they are in the same id. So, I try to make an index to determine which of them is being click. I attached the code below to make you (experts) understand of what i am trying to do. Please help me achieve the goal if is possible. My goal is to let the cursor focus from one input text to another by using arrow-up, arrow-down, left and right. Thank you!

<!DOCTYPE html>
<html>
<style>
table,th,td {
  border : 1px solid black;
  border-collapse: collapse;
}
th,td {
  padding: 5px;
}
tfoot {color:red;}
</style>

<table id="Tab1">
<tr>
  <th>Quantity</th>
  <th>Price</th>
  <th>Total</th>
</tr>
</table>

<br/>

<button onclick="return AddNow()">Add row</button>


<script>
function AddNow() {

  var p = parseInt("2.50");
  
  var table = document.getElementById("Tab1");
  var row = table.insertRow(table.rows.length);
  
  var cell1 = row.insertCell(0);
  var cell2 = row.insertCell(1);

  cell1.innerHTML = '<input type="text"  id="qty" class="Qty"  onkeydown="myIndex(this)"/>';
  cell2.innerHTML = '<input type="text" id="rp"  value="' + p + '"' + ' readonly/>'; 

}
</script>


<script>
function myIndex(x)
{
  var h = x.parentElement.parentElement.rowIndex; 
  alert(h);
  // here focus() must transfer to the next row depending on the user choice 

Open in new window

0
Hi experts, I wish to do Full screen event using button, that every time I press the button will do full screen just like the F11 on the keyboard. Help please!

<!DOCTYPE html>
<html>
<body>
<button size="25" onclick="return FullSreen()">F11 - Full Screen</button><br/><br/>
<script>
function FullSreen() 
{
  //Do FullScreen here
}
</script>
</body>
</html>

Open in new window

0
Hi experts, how to make codes that will give information of the browser, client side?

<!DOCTYPE html>
<html>
<body>


<button onclick="GetBrowserName()">Get Browser name</button>

<script>
function GetBrowserName() {
    
    alert("You're browser name is");
}
</script>

</body>
</html>

Open in new window

0
This question is a follow-up to this (solved) one :

https://www.experts-exchange.com/questions/29017643/classic-asp-edit-a-data-field-returned-by-a-sql-server-query.html

My goal was to be able to update records in a Classic ASP application, and that part is fine. The last step in my code is a Response.Redirect statement, which reloads the page after the update. This is fine, but as the form spans more than one page, after the update the user is not returned to the exact point in the page (has to scroll to get to the exact record again).

I looked at the code provided by Wayne Barron (http://www.cffcs.com/Tutorials/carrzkiss/39/Q_24801116.asp) [*excellent tutorial, btw - thanks!*], and I tried adding an anchor, but this only takes the user back to the top of the form, not to exact point where he left off, after clicking the "Save" button.

As each row of the form has a unique ID (getConID above), I tried using this also, in the redirect statement, but it did not work.

This is the code I use to update a record in the form :

<%
'updateform.asp v03 22-06-2017
getConID = request.form("ID")   'this is the unique row identifier
getCom = request.form("Comment")
getSchoolID = request.form("SchoolID")
 
' Now update the live TblReportsStoreComments table

Set sqlProp=Server.CreateObject("ADODB.Command")
sqlProp.ActiveConnection=Conn

sqlProp.commandtext="UPDATE TblReportsStoreComments SET txtComment=? where TblReportsStoreCommentsID=? "
sqlProp.Parameters.Append

Open in new window

0
On Demand Webinar: Networking for the Cloud Era
LVL 9
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Hello there I have looked through the interweb and cannot seem to find anything except TRIM to remove spaces.

Unfortunately Trim remove pre and post spaces, which I do not require

I was to remove the spaces within a field

eg. Te Awe Awe Gardner --> TeAweAweGardner

Any help would be great
0
Hi Experts,

I am trying to update legacy ASP code amd I am starting out with
<%@ Language=VBScript %>

<%
Session("isLocal") = True

Session("getRates") = ""
Session("getRatesTime") = DateAdd("n", -1, Now())	'DateAdd Intervals: s=secs; n=minutes; h=hrs

Session("Root") = "../"
Session("sourceID") = 1

If (Session("isLocal") = True) Then   
    %>

    <!--  <!-- #include file = "../../CSSN_subdomains/includes/common.asp" -->
    <!--  <!-- #include file = "../../CSSN_subdomains/includes/functions.asp" -->
    <!--  <!-- #include file = "../../CSSN_subdomains/includes/PageSetup.asp" -->

    <%
Else
    %>

    <!--  <!-- #include virtual = "/includes/common.asp" -->
    <!--  <!-- #include virtual = "/includes/functions.asp" -->
    <!--  <!-- #include virtual = "/includes/PageSetup.asp" -->

    <%
End If

Open in new window


However, I am getting the following error despite that Session("isLocal") is True, so lines 23-25 should never be executed.
Active Server Pages error 'ASP 0126'

Include file not found

/CSST_subdomains/cart.citysightseeingtoronto.com/index.asp, line 23

The include file '/includes/common.asp' was not found.

Open in new window


What is going on?

Any help will be greatly appreciated.
0
I have  sun server that runs a local application that uses the following ports: JMS 5630, XML 9672,
ASP Http 80 and ASP https 443, i can only telnet to port 80, telneting to the other ports I get
unable to connect to remote host: connection refused. I checked the /etc/services and I do not see the ports listed.
BTW: This application used to work without problems...

Thanks
0
We've got a few old customers that, believe it or not, still have old classic ASP sites.   We recently began to migrate them from SQL 2012 to Azure SQL Database.  After the database migration, we get the following errors on the sites:

Server Native Client 11.0][SQL Server]The request for procedure '[tablename]' failed because '[tablename]' is a table object.

I figure at this point there has to be a fix for this however I cannot seem to locate it.

Anyone have the magic bullet?
0
<form method="post" action="contact.asp">
                        <b>Envíenos un mensaje</b> <span></span>
                        <input type="text" name="fname" id="fname" value="Nombre">
                        <input type="text" name="email" id="email" value="Dirección de Email">
                        <select name="Consultorio">
                            <option>Elija Consultorio...</option>
                            <option>Queretaro</option>
                            <option>San Miguel</option>
                        </select>
                        <textarea name="message" id="message" cols="30" rows="10">Escriba aquí su mensaje...</textarea>
                        <input type="submit"  name="send" id="send" value="Enviar Mensaje">
                    </form>

how do i set a input name in the select in order to asp read the select option?
regards
0
Hi experts, I need to upgrade high version of excel to export html table to excel. The codes below are able to export from table to excel, How can i upgrade it to high version of excel with an extension .xlsx  ? any help please!

<!DOCTYPE html>
<html>
	<head>
		<title>jQuery Boilerplate</title>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
		<script src="dist/jquery.table2excel.min.js"></script>
	</head>
	<body>
    <button class="WinExcel">Export</button>
        <table class="Stocks32">
          <tr>
            <td>Erwin M. Malalis 500</td>
          </tr>
        </table>
<script>
	$(function() {
		$("button.WinExcel").click(function(){
			$(".Stocks32").Stocks32({
				exclude: ".noExl",
				name: "Excel Document Name",
				filename: "Prolist",
				//fileext: ".xls",
				exclude_img: true,
				exclude_links: true,
				exclude_inputs: true
			});
		 });
	});
</script>  
	</body>
</html>

Open in new window


!function(a,b,c,d){function e(b,c){this.element=b,this.settings=a.extend({},k,c),this._defaults=k,this._name=j,this.init()}function f(a){return a.filename?a.filename:"Stocks32"}function g(a){var b=/(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i;return a.replace(/<img[^>]*>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}function h(a){return a.replace(/<a[^>]*>|<\/a>/gi,"")}function i(a){var b=/(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i;return 

Open in new window

0

ASP

80K

Solutions

31K

Contributors

Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.