Session Objects And Condition
I've got the following code that sets a session object.
set obj = server.createobject("Scripting.Dictionary")
set session("testobj") = obj
If I want to remove the session object, do each of the following does
the same job? Which one is the best?
1 --> set session("testobj") = null
2 --> set session("testobj") = nothing
3 --> Session.Contents.Remove("testobj")
If I want to check if the session object is not exist, which is the
best option?
1 --> if (session("testobj") = null) then ...
2 --> if (session("testobj") = nothing) then ...
3 --> if (isobject(session("testobj"))) then ...
View Replies
ADVERTISEMENT
I'm creating a small program in Dreamweaver. The first screen is a login screen that contains a form, which asks for the users Email address and a password. The form is called 'login' which contains 2 fields, email: (called 'login') and password: (called 'password').
Anyway, to cut a long story short, I've managed to do all the authorisation stuff. A back-end database which contains a table called 'users' has all authorised emails and passwords. So when a user logs in, the login criteria is checked against the email/password in the Microsoft SQL database table, if it matches, they are redirected to the user account page.
At the top of the user account page I want it to say "Welcome! <Insert user email address here>" I know it may have something to do with session objects which are passed on but I have no idea how to program it.
View Replies
View Related
I have a password system on my site using session("login") = "" to assign a username that sticks with them once their password, etc. has been verified.
This session object then disappears as soon as they change page, I think because the lengthy free host's url is masked by a swish paid for one.
IE displays a privacy report icon at this point, presumably objecting to the fact that a cookie is being placed from a site who's url is not in the address bar.
View Replies
View Related
I am trying to pass sessions (namely an XML object stored in an ASP session), which work fine in IE, but fail to pass in Mozilla 1.7. Is there a way around this?
View Replies
View Related
I'm writing a reporting application in ASP.
I want to have links to a CF app - specifically VeriSign's eCommerce
Manager (on VeriSign's server).
The links in my app will need current values for CFID and CFTOKEN in
their HREFs - I think these are cookies or session objects the
VeriSign/CF app sets once logged in, they appear on the url.
Assume user has logged into VeriSign manager before my app.
View Replies
View Related
i am creating a kind of search using dropdown boxes to search the database. I have got two dropdown boxes one called location and one called cuisine i have sorted out some if statement.
so that it works if they select either one or the other and if they select any location or any cuisine but the problem comes when i need them to be able to select a cuisine in a particular location ie on bothe boxes.
i need it if both are selected at the same time then search the database via location and cuisine. can anybody help here is the code for the two files.
View Replies
View Related
if Line = "" OR NOT IsNumeric(Line) Then
error_list.add"589344","desired line must be specified"
b_error = true
End If
how i can display an error msg saying that the user must only key in number but not character
View Replies
View Related
i have got one field in sql server 2000 database. field1 char 50 in one record, i m storing value -1 but it doesnt satisfy following condition
if (rs("field1")) = cstr("-1") Then
response.write ("true")
end if
i already checked its value by response.write and
print -1 only..
then y its above condition is false?
View Replies
View Related
I WAS having problems. Solved it myself. I'll edit to show the working query for those who could use an example...
I'm having a multiple condition problem in my query statement. I know the what the result should be, but I have something wrong...
Here's the query:
set GetNADs = server.CreateObject("ADODB.Recordset")
set GetNADs.ActiveConnection = adoConnection ......
View Replies
View Related
what s the correct syntax of setting a condition with a variable that is retrieved from database like in the example below:
dim x
x = 9
if rsTypes("one") = x then
response.write ("error")
View Replies
View Related
I'm trying to make a very simple condition about some variable if it is empty do something but my problem is that it always cannot see it is empty
i mean i have a field in a table called title and this field is some times empty
so i need to type "empty" if it is
i tried this code ....
View Replies
View Related
I want to check a another field and if its got info in it i want it to do the then bit, if the field thats checked has no info then its off to else
can some one give me a quick hand on what it should look like?
<%If Your_Condition_Here Then
Response.Write("<form ACTION=""=MM_editAction"" METHOD=""POST'""name=""form1"">")
Response.Write("<input type=""text"" name=""textfield"" value=""(tpwimportrs.Fields.Item(""comments"").Value)"">")
Response.Write("<input type=""hidden"" name=""MM_update"" value=""form1""><input type=""hidden"" name=""MM_recordId"" value=""tpwimportrs.Fields.Item(""ID"").Value "">")
Repsonse.Write("</form>")
Else
' Do Nothing
End If%>
View Replies
View Related
I want to search through different strings and replace the ‘0’ with empty value. My problem is I want to search and replace the ‘0’ with empty values until there is a value other then ‘0’.
Examples
Ex 1: 000010000 - > my desired output -> 10000
Ex 2: 000170000 - > my desired output -> 170000
Ex 3: 004001000 - > my desired output -> 4001000
View Replies
View Related
I have set up a table of Ticket Types. Most of these only have a ticket number but one type also has a reference number.
I am trying to display the info in a table and show the ticket number for every type and only show the Ref number when it is applicable.
I'm guessing its a FOR ELSE statement but I can't get it working. Code:
View Replies
View Related
I want to change the font colour to red if a recordset value is 'high' but i dont know where to put the font tags, Heres what i got so far:
<td width="13%" align="center"><% if rs("priority") = "High" then response.write rs("priority")
else response.write rs("priority") %></td>
But where would i put the font tag and the colour, so it coloured the priorities marked as high red?
View Replies
View Related
I am trying to update and append to an existing XML file. However I seem to be stuck. I am using ASP as my scripting language.
The form fields has the same value as the KEY attribute so all i have to do is loop through the submiting form for its fields and use the name to update the XML via the keys... Code:
View Replies
View Related
I was working with filesystemobject in asp.
When i give filesysstemobject.copyfile the system will be gogin searching indefelty and IIS will get crash..
Why this pblm occurs..
View Replies
View Related
I would like to know if someone has already exchange ASP objects by SOAP with the SOAP Toolkit 3.0 ? Is-it possible ?Because, I have to connect, with ASP, to a Web Service and send to him array of objects.
View Replies
View Related
I'm so glad i finally found a web development forum! It's been a while and it's not easy to find. Until someone recommended this site to me.
Enough about that... I really want to learn about COM objects and don't really know where to go to find out about such things.
If someone could direct me to the right place, i'd be extremely grateful.
I've already learned ASP and PHP (though i have to admit that i am not an expert and I don't think i'll ever be one), but i aim to be a "jack of all trades".
View Replies
View Related
anyone have better information on IIS 5.0 memory behaviour on setting objects to nothing?
Connections and recordsets of course should be set to nothing, but should for example XMLNode object be set to nothing?
View Replies
View Related
I have a object which I declare as a application object "gObj".
I need to use "gObj" with all sessions. I need "gObj" to have access based on the user's id. Is this possible without creating multiple gObj's?
Code would be something like:
Application_OnStart
set gobj = Server.Create( "someDll" )
gobj.uname = "somename"
gobj.port = 1234
gobj.pwd = "pwd"
View Replies
View Related
I've created a simple pop-up form that
takes the required info and sends it via e-mail. Right now, I've got
the From E-mail, the To E-mail, the Subject, and the TextBody. It
works, and it's fine, but I'd like to spruce it up a little so I can
make it more personalized. Can I add other objects? I've been
searching for a general reference online that lists all my choices for
ObjCDO, but can't find anything, and any ideas of my own ("FirstName",
"Comments", etc.) have been shot down as not being supported.
View Replies
View Related
I have stored a .gif and jpeg file in the database as the BLOB object.
Now I am trying to create a report which displays that gif file along with another information.
Is there a way I can display the BLOB objects on the page without having to use any crystal report tool or anything ?
View Replies
View Related
I build a ATL object that is used in an ASP page.
Can I insert events inside this ATL object?
ATL is builded in C++
View Replies
View Related
I have a website with a large collection of pages. Many of these dynamic pages use multiple objects created via the Server.CreateObject method. There are filesystem objects, recordsets, browsertype objects, you name it. I need a script that will loop through all of the objects and Set them = Nothing to destroy them.
I imagine the script would be somewhat like this.
For Each obj In ServerObjects
If IsObject(obj) Then
Set obj = Nothing
End If
Next
View Replies
View Related
I created a label, a textbox and a button when i build the webform and try to see it with the explorer it only show the label
The other 2 objects (textbox and Button) at the Visual Basic.Net editor at the properties are visible and in the code i have
<asp:TextBox id="TextBox1" runat="server" Width="122px"></asp:TextBox>
What can I do that
View Replies
View Related
I've read that you shouldn't store objects in Session variables.
I've read these reasons:
- The object takes up memory that may not be freed until the session times
out. Better to create the object only when you actually use it.
- Causes poor performance because the thread that created the object has to
service all requests for it.
Assuming I can live with the memory and performance implications (a big if,
but let's assume it for a minute), what other reasons are there?
View Replies
View Related
1) can any one tell me what are built in objects in ASP 3.
in asp 2 it was
request
response
session
application
server
object context object
2)what are asp variables ?
View Replies
View Related
I have a problem with including an object in my asp page. I�ve translated an algoritm I found that was written in javascript and it needs a method, floor(), from System.Math to work.
in javascript you can just write Math.floor(x+1) but it seems asp doesn�t automatically include that Math object. It�s a little weird since the method Round() can be used withour any includes of any kind and thats a part of the Math object!
So... How do I do to access this floor() method?
I tried to write:
<%Imports System.Math %>
but it doesn�t seem to do the trick.
View Replies
View Related
Can i get any asp sample codes to retreive photo's from access database
For instances:To get codes on your pages Response.write......
similiar for images.
View Replies
View Related
Set obj = Server.CreateObject("")
can the above statement be used to create any objects other than a recordset?
View Replies
View Related
I have scripts on a server that awhile back had new option/server packs installed (to accomodate security and net framework issues) and my classic asp date references
"Date()" and "Now" will sometimes flip flop the formatting of the date from 10/3/2003 to 3/10/2003 (european mode).
What would be a good way to use an include file to perhaps an asp.net date object, or where would I find a good reference to using an aspx file to calculate and display the date properly so that I can avoid this flip flop snafu of the date formatting.
View Replies
View Related
ISessionObject is created each time When any ASP Page is started executing and destroys on the page ends (not session end) while the session state (data) is originated already somewhere from where ISessionObject fetches.
When user Request another page the ISessionObject is again constructed and the data from original location is loaded from there.Same with IApplication type object & IScriptingContext object.
View Replies
View Related