Global.asa Values Not Coming Through

i created a global.asa file with notepad and put it in the root directory

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Session_onStart()
session("mary") = "mary"
End Sub

</SCRIPT>
now in my asp code i put <%=session("mary")%>

and restarted my machine, and check the value of mary and there was none whats wrong here?
I didnt put a reference in my asp page to the global.asa file. I assume asp looks for it itself ?

View Replies


ADVERTISEMENT

Xml File Read But Html Values Not Coming

My xml file format is below:

<content> node have HTML format data i read xml file i got values but not in html format i also post asp code for reading xml file Code:

View Replies View Related

Global Values

i an input form through which the user inputs data.i store the data into
the databse by submitting hte form and then do some other processing.
i need that the values the user enters should be retrieved back when
fianlly after all the processing i get hte form...
hwo do i store such global variables? or do i need to adopt some other
method

View Replies View Related

Error Keeps Coming Up

i have not really altered anything in my web page but no everytime i try to load it it says

Microsoft VBScript compilation error '800a03ea'

Syntax error

/Student/StudentLogon.asp, line 48

Sub DisplayStudentLogin

even if i remove this function it then says there is an error with the next one please help

View Replies View Related

Option Value Not Coming In Form

I have seen a code to populate a list box from a data base table. Earlier I gave my own values using HTML coding like :

<Option Value="P-159">P-159</Select>. It was working fine but not after using code to build a list box, it is not coming in form value as input and next redirecting page retutns with error:

two codes pages are attached : profile page and search page. Profile page sends input to search page and search pages returns the output.

View Replies View Related

DateDiff Coming Up Negative

I was going to use the DateDiff function for something, so I looked up the syntax real quick at w3schools. Here's what they have:

document.write(Date & "<br />")
document.write(DateDiff("m",Date,"12/31/2002") & "<br />")
document.write(DateDiff("d",Date,"12/31/2002") & "<br />")
document.write(DateDiff("n",Date,"12/31/2002"))

Output:1/14/2002
11
351
505440

I put the same code into a simple test document to verify, except for mine has Response.Write. All my numbers came out negative. If I reverse their positions, I get positive numbers. Is the example above wrong or is there something going on with my PC?

View Replies View Related

My Link Isnt Coming Our Right

I want the link to come out as

search_results.asp?s1=Issue&s1t=Cancelled

but instead its coming out as

search_results.asp?s1= &s1t=Cancelled

I can't figure out why all of a sudden my variable s1 doesnt have a value once I hit the submit button. Here's my long extensive code. The important bits are the part where I response.write the s1 and s2 and s3 values, they show up on the first page but when I hit the submit button for some reason, they have no value anymore.

View Replies View Related

How To Execute ASP Code Coming From Database ?

I'm showing page contents text coming from database, normally the contents are plain text or in html formatting... it works fine.. but I want to add ASP code within page contents, as well... i did try but it dispalys ASP code as it is in the output...

is there any way to execute those asp code lines coming from database...?

View Replies View Related

Request.ServerVariables Coming Up Empty?

A few days ago all my Request.ServerVariables began coming up empty. I was using Request.ServerVariables("AUTH_USER") for basic authentication but now its useless. Our server administrator tells me he installed some "patches" last week but doesn't think he caused the problem. All I can say is that before the patch they worked fine. Anyone have any ideas on where to look for a solution?

View Replies View Related

Forms Coming Back Blank

I run a site and one of our services is a "free online quote" .I've made the whole form, including the .asp backbone to send it off (the file itself is .asp, but im pretty sure the language is in VB). It was working fine, but now the forms will come back blank most of the time. I know they cannot be submitted blank, because I have required feilds there.

The weird thing is, it was working flawlessly, then it started to crap out once or twice, now it rarely submits a real one.It might not be my coding, but I am really lost at this point.I'm using godaddy for a host btw.

View Replies View Related

Change Display Date Format Coming From DB

I have this is my code:

<%= linkRec("datein")%>

It displays the date like this: 12/14/2004

But I need it to display like: Dec 14, 2004 or something similar (not just numbers)

Is this possible?

View Replies View Related

ASP Form - Order Amount Not Coming Through On Email

This is my first asp form so please be gentle with me It's a publications ordering form. I've got the form and the asp code setup, when the form is sent the name of the publication comes through but not the amount ordered - i'm sure i've made a simple mistake somewhere - can anyone spot why the order amount isn't coming through. Code:

View Replies View Related

Global.asa :: Assign Diffrent Global.asa To Each Application

I have one application folder containing all ASP code files. I want host multiple sites pointing to same code. Can I do this ? If YES then how I can assign diffrent global.asa to each application...

View Replies View Related

Global.asa :: Combine Many Global.asa Files

I have added a db driven marquee to my site and need to combine the global asa's to 1 global asa file. Code: ......

View Replies View Related

Append The Coming Month Value In My Current Month

I need a date simple date function that would append the coming month value in my current month ...

View Replies View Related

Form Values With A File - Passing Values

I want to call a recordset so you can edit the details and then obviously pass the parameters onwards into the db. However, the user guide just says this:

To process other fields in the form, use the Form collection of the upload object the same way you would use the Form collection of the Request object. For example, if your form had a text element named UserName, your processing code would include: Code:

View Replies View Related

How To Convert Escape Values In To Actual Values

i need to convert the escape values which are by mistake updated in DB.
example:

this is a sample text string
is updated in DB as
this%20is%20a%20sample%20text%20string

here %20 is the space.

like wise there are many entries for :,'

is there way that i can update all this in a update statement?
or use asp to to update the records?

View Replies View Related

How To Extract Indiviual Values From A Set Of Values

I have a variable SET which has the value Of 1, 2, 3, .., N.

SET=val1, val2, val3, val4, ..., valN

What is the commend or procedure to extract individual values, val1, val2, ...

View Replies View Related

Global Asa

I am trying to put a condition in my Global.asa file based on the server
name.the reason, I want to set a global string as a application variable based on
the server I am on.
I also need to set a coonection string based on the value of the server.
I need to use this connection string to retrieve values from an sp in
application on start that sets a load of global variables so I can't really
do this anywhere else.

View Replies View Related

Global Asa

I have a site which until this morning, was on a remote server. The structure was that the "site" was actually a folder on the server, as I am designer and use this arrangement to develop sites. Under the root directory, I had modified the global asa file to include session variables. Ok, so I download the site (folder) to my hard drive, and put it in the folder of "MY Documents" called MyWebs. I then opened VB Studio and created a new solution, which is pointing to the before mentioned directory in My Documents. When I pull the site up in IE, the session variables were not being called, and I realized I had not copied over the asa file. So I did so, placing a copy of it in the hard drive's c inetpub wwwroot directory, and also directly in the my docs mywebs directory,and the site's directory as well. It seems it is still not being called.Can anyone tell me what I am doing wrong?

View Replies View Related

Global.asa!

Is the Global.asa file resolved before parsing the 'Include' (files) or
after parsing the 'Include' (files)?

View Replies View Related

ASP, GLOBAL.ASA

I have IIS 5.0 installed on for a test server. the global.asa file runs perfectly.

when tryng the same application on win server 2003 IIS 6.0 the global.asa does not fire. i have set the application as a virtual site and given rights for iwam and iusr. What else could be the problem. Code:

View Replies View Related

GLOBAL.ASA And IIS 6.0

How does IIS 6.0 treat the global.asa file? I had the following problem;

1. uploaded a new site to the win3k server

2. had incorrect db connection string in Session_OnStart in global.asa and website caused errors.

3. Changed the global.asa file to include the correct details. Saved the file. Still got the same errors.

I could not resolve this unless restarting the WWW Service on this server. In IIS 5.0 the global.asa file would reload after resaving it (as the timestamp is updated).

I even waited the next day before restarting the service because I though Session_OnStart expires after my session ends...but the error was still there
in the morning.

Hopefully someone will make sense of it for me. Here is the code (I inherited) in the global.asa

Sub Application_OnStart
Application("DB.ConnectionString")= ""
Application("MaxLoginAttempts") = 5
Set Application("Con") = Server.CreateObject("ADODB.Connection")
Session("Test") = Now()
End Sub

Sub Session_OnStart....

View Replies View Related

ADO In Global.asa

Is it possible to use ADO in global.asa?I simply want to creat a log of each visit to the site?

View Replies View Related

COM And Global.asa

I created a dll to track our users and I want to call it in the Global.asa. How do I do this? I've seen the <OBJECT> tag to create an object, but I'm not sure how to use it correctly.

View Replies View Related

Global.ASA Reg.

I dont have any idea about Global.asa. Is it for global variable declarations?

View Replies View Related

How To Use Global.asa

i'm a little bit confused with using application_onstart.. as u can see in the following code... my DB connection and SQL statements is currently included in my application_onstart event.. but, unfortunately, i wasn't able to reference Application("sUser") in my asp when i tried to run my website Code:

View Replies View Related

Global Changes To SQL

We have over 100 asp pages that reference a table (distribution_components). We added a new column and primary key to that table, so now we have to modify the where clause to include that column (we have to make the new column = to a session variable in the page)

The table appears 531 times in our code. Is there some util or method that allows us to change it globally, other than going to each occurrance, and adding the new column to the where clause.

View Replies View Related

Global Session_Onend

Basically session_onend will not fire in my global.asa files! I have just made a very simple test to prove its not my programming and it still doesnt fire.
Session_onstart works a treat but onend will not work even if you force the session to expire with abandon. I have tried on 2 of our servers now and it doesnt work on either.

my simple test is this:

Sub Session_OnEnd
application("test") = "hello"
End Sub

Now surely that should work. i obviously have a page that writes that test variable to the page but its always empty.

View Replies View Related

Cookies In Global.asa

Set IE 6.0 ver. X to "Block all Cookies" in privacy settings and try
this code in three separate files.

<-- Global.asa -->
sub Session_OnStart
response.cookies("test") = "-1"
end sub
<-- Global.asa -->

<-- testcookie1.asp -->
<%Response.Redirect("testcookie2.asp")%>
<-- testcookie1.asp -->

<-- testcookie2.asp -->
<%=request.cookies("test")%>
<-- testcookie2.asp -->

I get "-1" on testcookie2.asp

Anyone else get the same result?
Why am I getting the cookie in this test?

View Replies View Related

Global.asa And Session_OnEnd

So when *does* Session_OnEnd fire in my Global.asa file? Does it fire when
they click a link to leave the site? Does it fire when the session times out?

View Replies View Related

Global.asa To Ban IP Addresses

I need to Ban IP's on my IIS server. I know the IP's I need to ban, but how to I write the global.asa file correctly.

View Replies View Related

Global.asa Session_OnEnd

I have an ASP application that is a electronic purchase orders system. My
problem is that only 3 people can authorise a purchase order. When a
purchase order is selected I update the table to show that the field is
locked. If they complete the form then the database is updated and the lock
is removed, all though at this stage the record moves into another part of
the system and the lock becomes redundant.
If however they dont complete the form the record is left in a permanent
locked state, it could be that they decided to look at the record then
navigated away or closed the browser.
So i thought maybe i could stick some code that updates the database into
the session_OnEnd in the global.asa, so after 20 minutes when the session has
ended the lock will free. I don't however have any experience with this and
don't even know if this will work. The code won't be a problem its just
whether this process will actually work.
I am thinking that I code put the order_id into a session variable then when
the session variable ends i run a sub in the .asa file that gets the session
variable and updates the table.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved