Validation only works sometimes
I've got a C# ASP.NET web form that fails to validate
under certain conditions. I have a radio button that
causes an AutoPostback that enables certain other elements
on the form. If I click that radio button, the validation
will work when I click Submit. However, if I enter the
page and never click that radio button then the page
submits as if there were no validation at all. I'm not
sure how that radio button fits into the picture but was
wondering if anyone else had seem something similar to
this?
Thanks in advance for any helpful ideas anyone may have.
Shane Tag: site asp.net with mysql Tag: 265651
list documents in a html table
I currently have a set of documents in a directory that i need to list in a
html table. Is there any way to generate the table with the documents listed
instead of having to update the table manually everytime a new document is
added to the list.
Thanks
Ken Tag: site asp.net with mysql Tag: 265649
how to open client phone dialer from ASP page
This is a multi-part message in MIME format.
------=_NextPart_000_00B3_01C35043.11C722C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I need to open client phone dialer from my asp page that contains phone =
number and fill phone number automatically when dialing. What should I =
need to start about this? Please help!
Jen
------=_NextPart_000_00B3_01C35043.11C722C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I need to open client phone dialer =
from my asp=20
page that contains phone number and fill phone number automatically when =
dialing. What should I need to start about this? Please =
help!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Jen</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_00B3_01C35043.11C722C0-- Tag: site asp.net with mysql Tag: 265643
Not using NT authentication
I have an asp page on IIS 5.0 and I''m trying to get a dialog box to pop up and ask for username password and domain to authenticate against NT. I have anonymous logins unchecked in the IIS properties page and access restricted on everything but it won''t ask for a username and password no matter what! Please help!
-----------------------------
This message is posted by http://Asp.ForumsZone.com Tag: site asp.net with mysql Tag: 265641
What am I doing wrong with checkbox update?
I have a form with multiple:
<input type="checkbox" class="checkbox" name="green" value="true"<% if
rs("hardstyle") = true then %> checked<% else %><% end if %>> Green<br>
And I have the following
if request.form("green") = false then
db.execute("Update tblmemberinfo set green = false where mID = " &
Request.cookies("isLogged")("mID") & "")
else
db.execute("Update tblmemberinfo set green= true where mID = " &
Request.cookies("isLogged")("mID") & "")
end if
Each ofcourse with different names
It is possible to set it to true but not able to change it back ?
Help me please!
Willem-Jan Selen Tag: site asp.net with mysql Tag: 265640
A Free ASP/HTML Editor?
I am looking for a free ASP/HTML editor. I have downloaded a few but
they haven't really been what I am looking for. I want something
pretty simple but that has colors, smart tabbing, etc. Any
suggestions would be great! Thanks. Tag: site asp.net with mysql Tag: 265636
Out of String Space: 'Replace'
All of a sudden this morning my ASP files started generating the error:
Out of String Space: 'Replace'
These script files have been running just fine for several weeks with no
problems. I did review the code and yes the script is calling the
Replace function at the line specified in the error information.
I'm puzzled as to why the code would all of a sudden start generating
this error ?
Any ideas ?
Ed Tag: site asp.net with mysql Tag: 265612
HTTP/1.1 New Session Failed
Hi, getting the
HTTP/1.1 New Session Failed
message when trying to access an ASP page. It seems intermittent, at some
point one machine will keep getting this message while another will access
it just fine. The next day it will be the other way around. This page and
application, just have regular ASP pages, not doing anything too
spectacular.
Any ideas? Tag: site asp.net with mysql Tag: 265609
<TD> Question
Hi,
I am planning to insert data into column depending on
which column.For example i wanted insert data in row 1
column 23, and row1 column 25..
Can i use sth like this:
******************************************
if column=25 then
for i=1 to 25 'goto the 25th column and insert data there
<td></td>
next i
write "fruits"...
*********************************************
will it work?if not wht wud be better idea in inserting
data in such scenario as above?
TIA Tag: site asp.net with mysql Tag: 265593
Windows NT authentication and asp???
Hi,
Can someone tell me how I create a login page which
authenticates users against the servers user manager. I
want the login to be a form in my website not a pop up
window!
I would be grateful for any advice relating to this
subject. I have a script for windows 2000 active directory
but was wondering if you could achive the same with
windows NT 4 and IIS 4
Thanks for any help!
..:: Active Directory Example :..
<form action=authad.asp method=post>
Username: <input type=text name=strUserName><br>
Password: <input type=password name=strPassword><br>
<input type=submit name=btnSubmit>
</form>
<%
If Request.Form("strUsername") <> "" Then
Dim strADsPath
strADsPath = "WinNT://copenhagendome1"
'userid =
strUserName = "copenhagendome1\" & Request.Form
("strUserName")
strPassword = Request.Form("strPassword")
if (not strADsPath= "") then 'if and ADS Object path has
been provided
proceed with authentication
' bind to the ADSI object and authenticate Username and
password
Dim oADsObject
Set oADsObject = GetObject(strADsPath)
response.write "Authenticating...<br><br>"
Dim strADsNamespace
Dim oADsNamespace
strADsNamespace = left(strADsPath, instr
(strADsPath, ":"))
set oADsNamespace = GetObject(strADsNamespace)
Set oADsObject = oADsNamespace.OpenDSObject(strADsPath,
strUserName,
strPassword, 0)
' we're only bound if err.number = 0
if not (Err.number = 0) then
Response.Write "<font color='red'><font size =
5><u><b>Authentication has
failed...<b></u></font></font>"
'Response.Write "Failed to bind to object <b>" &
strADsPath & "</b><br>"
'response.write err.description & "<p>"
'Response.write "Error number is " & err.number & "<br>"
Session("Auth") = "NO"
else
Response.Write "<font color='blue'>USER AUTHENTICATED!
</font><br>"
'Response.Write "Currently viewing object at <b>" &
oADsObject.ADsPath &
"</b><br>"
'Response.Write "Class is " & oADsObject.Class & "<br>"
Session("Auth") = "YES"
end if
'response.write "<p>"
end if
End If
%> Tag: site asp.net with mysql Tag: 265581
How to use Crystal Reports 8.5 in ASP v 3
HI,
I have created a report in Crystal Reports 8.5 and want to display it
on my clients webpage. I will develop this webpage in ASP v3 so plz
give me the code with which to show this report of Crystal Reports 8.5
in the webpage developed in ASP v 3. I used Crystal Report Viewer
ActiveX control but I do not know what code to write so that the
control works properly,
regards,
Mustafa Haider Tag: site asp.net with mysql Tag: 265580
How to show Crystal Reports 8.5 in ASP v3
HI,
I have created a report in Crystal Reports 8.5 and want to display it
on my clients webpage. I will develop this webpage in ASP v3 so plz
give me the code with which to show this report of Crystal Reports 8.5
in the webpage developed in ASP v 3 . I used Crystal Report Viewer
ActiveX control but I do not know what code to write so that the
control works properly,
regards,
Mustafa Haider Tag: site asp.net with mysql Tag: 265579
Out of memory: 'Server.CreateObject'
Hi group!
I am getting the following error from my ASP application:
Microsoft VBScript runtime error '800a0007'
Out of memory: 'Server.CreateObject'
It always (as far as i have observed) occurs when i try to create a new
ADODB.connection object in my cCon helper function (opening a connection and
returning it):
Function cCon()
Dim cnRet
set cnRet = server.createobject("ADODB.Connection") 'This is where the
error is thrown
cnRet.connectionstring = GLB_CONSTR_DB
cnRet.open
Set cCon = cnRet
End Function
The page that errors will typically call this function 6- 10times from
different functions which handle their connections in this way:
Function Foo()
dim Con ...
Set con = cCon()
.... function code
con.close
set con = nothing
End Function
All my recordsets are disconnected and also destroyed with .close and Set
rst = nothing.
I have tested the application on two seperate servers with the same result.
Both machines had more than enough memory.
I have also checked the application log to see if anything was logged, but
there wasnt.
Any one got ANY ideas on this one? I'm starting to get desperate! Tag: site asp.net with mysql Tag: 265577
FSO "getfolder" method problem.
Hi,
I bought a ASP portal script, aspportal.net, But It gives a problem from a
line,
Set folderpath = fso.getfolder(thepath)
The error is,
Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'getfolder'
/aspportal/themes/themes.asp, line 37
What could be the problem? Please kindly help.
Regards,
Benny Tag: site asp.net with mysql Tag: 265574
escape in ASP
When chucking data in a cookie you cannot use certain characters (in
this example ? : ? ).
To get around this you use escape and unescape. Trying to use the
escape as such:
Response.Cookies("Lines")("URL4") = escape("http://www.ASP101.com")
Gives the following result:
URL4=http%3A//www.ASP101.com
Which I don't think does anything to help. So using it like this:
Response.Cookies("Lines")("URL4") = "escape(http://www.ASP101.com)"
Gives the following result:
URL4=escape(http://www.ASP101.com)
Which is the correct result apart from the ?escape' actually
appearing. Any ideas how to get around this? Tag: site asp.net with mysql Tag: 265566
escape in ASP
When chucking data in a cookie you cannot use certain characters (in
this example ? : ? ).
To get around this you use escape and unescape. Trying to use the
escape as such:
Response.Cookies("Lines")("URL4") = escape("http://www.ASP101.com")
Gives the following result:
URL4=http%3A//www.ASP101.com
Which I don't think does anything to help. So using it like this:
Response.Cookies("Lines")("URL4") = "escape(http://www.ASP101.com)"
Gives the following result:
URL4=escape(http://www.ASP101.com)
Which is the correct result apart from the ?escape' actually
appearing. Any ideas how to get around this? Tag: site asp.net with mysql Tag: 265565
ASP/Access DB
I have a small company creating a small site. Until it
gets big, they
switch to an MSSQL database hosted on a full-t1 site, and
all that jazz
they've got lowly ol' me working it into an Access
database.
I'm logging all the code with a logging function I
created. The log
function writes a row to the database each time I call the
function with
something like, "User logged into the web site".
I came to the stark realization that each time a user
loads my page they hit
the database with an SQL query at least 40 times. That
seems like a lot.
It seems unecessary given the simplicity of the site.
I realized a lot of my data is static. So I thought, "why
do i need to hit
the database and pull this data constantly if it will
rarely change?"
What methods are people using to mitigate database hits?
Can a simple array
be stored into a global ASP variable that all the sessions
could access?
XML (but I don't really know it well yet)?
I'm looking for advice, thanks! Tag: site asp.net with mysql Tag: 265556
most valuable professional.
Where can I find information about "most valuable professional"?
How do you get the MVP title??
I've heard that it's a pretty lucerative title ;) Tag: site asp.net with mysql Tag: 265554
trimming a variable.
I need to trim a variable to have everything after 4 chars in a string.
IE:
var_temp = 200:16:1234567890
i want everything after 200: to be a variable.
I cannot use:
var_new = right(var_temp,14)
because the string is a different length everytime.
I just dont know this function. please help :D
Mario C
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! Tag: site asp.net with mysql Tag: 265541
sort data from a table by count value's?
Is it possible so sort data from a table based on the count results?
I have the following
<% set rs = db.execute("Select * from tbleventinfo order by ename")
while not rs.EOF
tmp = rs("eid")
set rs1 = db.execute("Select count(eid) from tbleventdj where eid = " &
tmp)
if rs1.EOF = false then
total = rs1.fields.item(0)
else
total = 0
end if
set rs1 = Nothing
echo rs("ename") & "(" & total & ")"
rs.moveNext
if rs.EOF = false then Response.write "<br>"
wend
set rs = Nothing
%>
which works fine. but as you can see it sorts it all out bases on the
ename...
Any help apriciated!!
Willem-Jan Selen Tag: site asp.net with mysql Tag: 265536
Session Variables Persist Across Window Close on Mac IE 4.5 and Greater
I've noticed that session variables will persist on Mac IE even after all
browser windows have been closed. One must quit the program to clear the
session variables. This presents a security risk for my session variable
based security scheme.
Basically, the risk is that a user will login to my site, close the window
when done and allow someone else to come up to the machine, go back to my
site and be logged into the previous user's account.
Anyone know how to make session variables disappear when a window closes?
Any other ideas? Am I going to have to redesign my whole security scheme?
Any suggestions are appreciated.
Dave Tag: site asp.net with mysql Tag: 265525
Variable in the field name.
Hi All,
I have one question. Usually, we can get data from table
by using rst("userid") because we know the column name
userid. Now, I have a variable to hold the column name. I
want to get data value like this rst(var1). However, I got
an error message.
Thanks.
my Tag: site asp.net with mysql Tag: 265523
Change Password Error
Hello,
Exchange 5.5 SP4 on W2K SP3.
When in OWA, go to Options->Change Password, i's returning an error when you
submit. I fill in the info for Domain, Account, old, new and confirm
passwords and it says "Error number: -2147023569 ". Then there's a link that
says 'Back' so that you can try again. Anyone seen this error before? A
search on Google and KB's returned nothing...
Thanks in advance,
Tony Tag: site asp.net with mysql Tag: 265514
2 global.asp questions
1. how to determine the 'progid' parameter in the /oject tag for both
session and application tags, eg,
<object runat="server" scope="application" id="web1" progid="web1">
</object>
2. i want to invoke the meta data for ado in my global.asa, so it will there
for all the sessions:
<!--METADATA TYPE="TypeLib" NAME="Microsoft ActiveX Data Objects 2.1
Library" UUID="{00000201-0000-0010-8000-00AA006D2EA4}" VERSION="2.5"-->
is this then coded within the application 'object' tags, see 1, or is it
coded in the application_onstart subroutine?? Tag: site asp.net with mysql Tag: 265508
How can u connect to 1 of several dbs based on selection user makes when accessing main page
We have a web site IIS 5 (on Win2000k) with Oracle 9i backend (Sun unix).
There is 1 user ID to oracle(APT_W3) that is used by all users (50).
We have a global.asa file that has one APP Start connection string using OLE
DB:
Application("dbConnString")="Provider=MSDAORA.1;Password='SDERSD';User
ID=APT_W3;Data Source=CCEWSDD1_new;Locale Identifier=1033;OLE DB services=-1"
The first page that a user sees asks that they select the area they want to
see (western, northern, etc) from a dropdown menu. Once they select it and
hit save they can go to other pages, session varibles indicating what area
they selected are then passed to pages. Currently all areas are in one
database.
What we want to do is have areas in separate dbs, a northern one, a western
one.etc. Each will have separate user ids (APT_W2N, APT_W3W,etc).
We want the users to have the web page presented to them where they select an
area. Based on the area they select, the appropriate conneciton string will
be used (the one in the global asa).
Is there a way to have that in the global asa? Maybe as a session
Session_OnStart? Based on the selection they made on the web page, they will
be using one of several connection strings so we can have connection pooling Tag: site asp.net with mysql Tag: 265488
problems width select line
This is a multi-part message in MIME format.
------=_NextPart_000_003C_01C34FC1.EE9CC600
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi!
I am having some problems width a little script i downloaded...
I'm not able to figure out what he SELECT line does!
What does the @@identity mean?
Is this maby a javascript? :)
function GetLastIdentity(ADOConnection)
{
var rstIdentity =3D Server.CreateObject("ADODB.Recordset");
rstIdentity.Open("SELECT @@identity AS IdentityId", ADOConnection);
var iIdentity =3D rstIdentity.EOF =3D=3D false ? =
rstIdentity("IdentityId").value : -1;
rstIdentity.Close();
return iIdentity;
}
------=_NextPart_000_003C_01C34FC1.EE9CC600
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I am having some problems width a =
little script i=20
downloaded...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm not able to figure out what he =
SELECT line=20
does!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>What does the @@identity =
mean?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Is this maby a javascript? =
:)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>function=20
GetLastIdentity(ADOConnection)<BR>{<BR> var rstIdentity =3D=20
Server.CreateObject("ADODB.Recordset");<BR><STRONG> <FONT=20
color=3D#ff0000>rstIdentity.Open("SELECT @@identity AS IdentityId",=20
ADOConnection);</FONT></STRONG><BR> var iIdentity =3D =
rstIdentity.EOF =3D=3D=20
false ? rstIdentity("IdentityId").value :=20
-1;<BR> rstIdentity.Close();<BR> return=20
iIdentity;<BR>}</FONT></DIV></BODY></HTML>
------=_NextPart_000_003C_01C34FC1.EE9CC600-- Tag: site asp.net with mysql Tag: 265486
Error Too few parameteres expect 1
Works fine.
Recid = rs("id")
SQLstmt = "SELECT * FROM courses WHERE ID=" &
Request.QueryString("Recid")
When i combine two tables
SQLstmt = "SELECT tblAuthor.employee_code, tblAuthor.name,
Courses.status, Courses.ID, Courses.mdate, Courses.InstructorID, FROM
tblAuthor INNER JOIN Courses ON tblAuthor.employee_code =
Courses.InstructorID WHERE Course.ID=" & Request.QueryString("Recid")
i get Too few parameteres expect 1
is it a syntax error? Tag: site asp.net with mysql Tag: 265485
Web Bulletin for ASP 1.0 Released.
Sunwest Technologies is pleased to announce the availability of Web
Bulletin for ASP, a server-side component for easy creation of
bulletin board in a web browser. The bulletin board can be used to
display news, events and messages.
* The messages can be specified by an XML file or through COM
interface
* Fading and scrolling effects are provided
* All major browsers are supported
* Can be used FREELY
For more information on Web Bulletion, please visit
http://www.SunwestTek.com/wb
Sincerely,
Sunwest Technologies,
http://www.SunwestTek.com Tag: site asp.net with mysql Tag: 265480
POS Cash Drawer with Internet Explorer?
Hi,
I'm getting tasked with writing an ASP application deployed throughout the
company's intranet where all the workstations will be running Internet
Explorer 6.0.
It's a retail business, and some of the workstations are Point-Of-Sale and
will need to have cash drawers and bar-code scanners.
The project managers want this as a web-application because of the ease of
deployment and updates to the other stores. The problem is, I don't know how
to activate the cash drawers from within IE. Is there any kind of ActiveX
control which can be plugged into IE to allow control over the cash drawer
from within IE? We don't have the cash drawers purchased yet, and are
waiting to find out if anyone makes an ActiveX plug-in control and cash
drawer which will work from IE.
Suggestions and recommendations would be greatly appreciated.
Thanks,
Scott Tag: site asp.net with mysql Tag: 265478
ASP.NET on a DomainController
I'm developing an ASP.NET app that uses ActiveDirectory. To demo
this, I've built a notebook as a Win2000 DomainController with IIS.
To my pleasant surprise this actually worked - at least until I
patched it the other night. Now I get nothing but security violations
(access denied), with no usefull indication as to what security I've
violated. I'm using 'impersonate' mode and I'm logged in as the admin
of the only Domain.
I can get this working with .NET 1.0 and an un-patched DC, but I need
to upgrade it to .NET 1.1 which requires patches that will introduce
the security problems.
I've tried modifying the Machine.Config to use 'SYSTEM' rather than
'machine' as the processed, this didn't do it.
Does anybody have a hint on what security settings need to be tweeked
to get this to work?
Thanks,
Randy Tag: site asp.net with mysql Tag: 265457
is there anyone from microsoft IIS group, please!
Hi i am searching for anyone from IIS /ASP team.please contact me or lave
me a message here or email me.
Regards
Bogomil Tag: site asp.net with mysql Tag: 265446
Help converting short php script to ASP
I've got this PHP script working on one of my sites and
now need an ASP version for my intranet.
I don't know ASP, can anyone help out?
Know of anyway to NOT have a blank browser window open
when clicking on the link or even a better solution to
prevent spam harvesters?
<?
// email.php
// usage:
//
// <A HREF="email.php?to=me&domain=mydomain.com">E-Mail Me</a>-->
//
//
if (!isset($to))
//if(!isset($_GET['to']))
{
// $_GET['to'] = "info";
$to = "info";
}
if(!isset($domain))
{
//$_GET['domain'] = "mydomain.com";
$domain = "mydomain.com";
}
// $to = $_GET['to'];
// $domain = $_GET['domain'];
$email_address = $to."@".$domain;
// send email header to page
header ("Location: mailto:$email_address");
?> Tag: site asp.net with mysql Tag: 265445
Number format problems with SUM and AVG
Hie everybody,
I have a problem with the following,
I have a table with a row containing numbers with 2 decimal places.
I want to count the sum of these numbers but my valuw returned is far to
high. I think the SUM string doesn't look at the decimal place.
The same is with the AVG string
Here are the ones I tried :
set rs = db.execute("Select SUM(ePrize) from tbleventinfo")
if rs.EOF = false then
aveprize = Formatnumber(rs.fields.item(0),2)
else
aveprize = 0
end if
set rs = Nothing
and
set rs = db.execute("Select AVG(ePrize) from tbleventinfo")
if rs.EOF = false then
aveprize = Formatnumber(rs.fields.item(0),2)
else
aveprize = 0
end if
set rs = Nothing
Can anybody help me allong the way?!
Thanks in advance,
Willem-Jan Selen Tag: site asp.net with mysql Tag: 265408
Auto refresh asp
Hi All,
I want to refresh a page every 5 mins without the users' intervention.
I'm not sure that this is possible at all.
Do you?
Thanks in advance.
Abe. Tag: site asp.net with mysql Tag: 265382
How to display in any lanaguae
hi,
Guys.....
I am Making A website....in asp
Now my data is stored in Sql Server....
What i want is to display the Data as per Languaue the user selects..
The data stored in sql server is english
if the user selects French in asp site the data from the backend should be
displayed in FRench...
or based on ip address and location automatically the Data....sholud be
Displayed according to The REgional...settings..
ie guy logging on from japan sholud see data in japanense..
can this be done or what?
Please help me out...
regds,
Navin Mahindroo Tag: site asp.net with mysql Tag: 265370
problem with creating a database in win xp
hallo
i have to do a code in ASP that including this code:
set c=server.createobject("adodb.connection")
c.open "dsn=MyDSN;"
c.execute "create table first_tables(Name char, Tel char)"
and i am geting that error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E09)
[Microsoft][ODBC Text Driver] Cannot modify the design of
table 'first_tables'. It is in a read-only database.
/1.asp, line 4
what can i do?
thanks
zeev j Tag: site asp.net with mysql Tag: 265366
ASP class-session variable
Hiya - Big puzzler for me. Code Below
I create a class. I save it to a session variable.
Then, I retrieve the session variable back into a new local variable.
I am able to use a method which prints the name "Joey."
Works great.
But if I retrieve the same session variable into a local variable from a
different page, I cannot use the method. It fails.
Even though the session variable is an object, and the local variable is an
object!
Why? How can I get to this class from the second page?
thanks
<%
dim oTest
set oTest= new clsEmployee
oTest.EmployeeName="Joey"
set session("sessionTest")= oTest
set oTest= nothing
'This section works fine------------------------------
'But not from another page!
dim oNewTest
set oNewTest = session("sessionTest")
Response.Write "<br>Is oNewTest an object? " & isObject(oNewTest)
Response.Write "<Br>"
Onewtest.PrintEmployeeName
---------------------------------------
Class clsEmployee
Private m_strEmployeeName
Public Property Get EmployeeName
EmployeeName = m_strEmployeeName
End Property
Public Property Let EmployeeName (strEmployeeName)
m_strEmployeeName = strEmployeeName
End Property
Sub PrintEmployeeName
Response.Write EmployeeName
End Sub
End Class
%> Tag: site asp.net with mysql Tag: 265358
clientside events
I want to validate client entries into textbox,checkbox
controls etc. can u do this with asp. Like, is there
onchange and onclick and so on for these controls?
is there a reference for this in the sripting help? Tag: site asp.net with mysql Tag: 265356
client-side WSH in ASP
Dear all,
The following code is used to show installed printers on a
computer,it works on server machine,however, if use a
client machine to browse, it also shows the intalled
printers on the server machine.Actaully, what i want to do
is to show what printers installed on your own machine
(that means show it on client-side). Do you guys
understand my problem?Please help please help, this
problem has already existed for a long time, i really need
your help!
<%
Dim WshNetwork, objPrinters, i
Set WshNetwork = server.CreateObject("WScript.Network")
Set objPrinters = WshNetwork.EnumPrinterConnections
For i = 0 to objPrinters.Count - 1 Step 2
response.write objPrinters.Item(i+1) & "<br/>"
Next
%>
Thanks a lot!!
Karen Tag: site asp.net with mysql Tag: 265350
string variable - weird error - help me!!!!
hi,
I have a variable which has lots of text (html code more specifically)
assigned to it. What I need to do is to strip away large chunks of it from
the beginning and end of it.
I need to recognise some div tags as the beginning and end of the string and
to throw everything else away. I have no guarantees that the surrounding
text will be the same each time it is used. So does anybody know how to seek
out and find some characters and strip everything before it and then to find
a closing tag and strip everything after it.
The problem I am currently having is a puzzling one, if i strip away text
from a hard coded variable, everything gets posted to my database just fine,
however when i try it on my form retrieved string variable my start position
is always '0', indicating that the text i am seeking has not been found.
My theory is that the search will not read new lines, and is only reading
the very first line of text from the string and nothing else.
Does anybody know if this is a correct theory, and if so how I can get my
search coding to go onto the next line?
any help would be greatly appreciated Tag: site asp.net with mysql Tag: 265348
stopping users registering with the same username?
Hi, i've got a asp page to register a user and check that the username has
not been previously registered, heres the code i have ... that doesnt work
<SCRIPT LANGUAGE=vbscript RUNAT=server>
'Adds a record to the table
Dim SQL 'A variable for the SQL statement
Dim ObjConn 'A connection varaible
Dim ObjRS
Set ObjConn = Server.CreateObject("ADODB.Connection")
Set ObjRS = Server.CreateObject("ADODB.Recordset")
rsSQL = "SELECT * FROM tblUsers WHERE strUser='" & Request.Form("strUser") &
"' "
SQL = "INSERT INTO tblUsers "
SQL = SQL & "(strUser, strPwd, strEmail) "
SQL = SQL & "VALUES ('"& Request.Form("strUser") & "', '" &
Request.Form("strPwd") & "','" & Request.Form("strEmail") & "')"
ObjRS.Open rsSQL, "DSN=Project"
If ObjRS.RecordCount > 1 Then
Response.Redirect ("retry.html")
Else
ObjConn.Open "DSN=project"
ObjConn.Execute SQL
End If
ObjConn.Close
Set ObjConn = nothing
Response.Redirect("ok.html")
</script>
i am going the right way about it?
if so where have i gone wrong?
if not could someone please point me in the right direction
any help is appeciated
Regards Tag: site asp.net with mysql Tag: 265344
string manipulation problem - Replace
Hi all,
I'm new to ASP so this is probably a problem caused by me.... but here goes.
I have been pulling some information from an access database (specifically a
postcode)
eg. GL3 2SD, I need to swap the space " " for an plus sign "+" and have been
trying to use this code -
<%Dim ModPostCode
If GetPropertiesRecordset.Fields.Item("AddressPostCode").Value <> ""
Then
ModPostCode=GetPropertiesRecordset.Fields.Item("AddressPostCode").Value
Replace(ModPostCode, " " , "+")
=ModPostCode%>
Some other html........
<%End If%>
But I get this Error -
Microsoft VBScript compilation (0x800A0414)
Cannot use parentheses when calling a Sub
/searchresults.asp, line 354, column 31
Replace(ModPostCode, " " , "+")
I have tested all the lines to make sure that the data is OK and in the
variable 'ModPostCode', I just can't get the Replace command working... Any
ideas... anyone... please....
Cheers
Coz. Tag: site asp.net with mysql Tag: 265341
ASP.NET
hi,
i have a datagrid in a page. when i sort by a column, the
postback occurs, so i get the old version of the page
availbale in the brower back button. I want to hide the
page from the back button when it is in the postback
status.
i want to hide the page from the back button of the
browser so when i sort the grid, i want the new result
(response) to replace the current link in the browser back
button.
can this happen?
thank you Tag: site asp.net with mysql Tag: 265338
500 Internal Server Error
Hi all,
Just wondering if you could possibly check this site for me - www.gtfasteners.co.uk . I am getting a 500
Internal Server Error message every time I try to log in, however I have set all file permissions related to
the login as read,write and execute.
Username = user
Password = fasteners2003
I don't know all that much about ASP yet as I am learning, but I have managed to get the site working fine on
my localhost using IIS. But when the site is uploaded to the remote server, 1&1 Microsoft package, I get the
errors.
Any help is much appreciated.
--
Regards,
Chris.
http://www.chrisf.has.it
http://www.lascoronas10.has.it
http://www.boro.rules.it
http://www.chrisfuni.has.it Tag: site asp.net with mysql Tag: 265329
DateAdd does not work
Dear Lord,
I'm trying to code a drop down for a date entry that gives
the user the option of the current date plus the dates of
the last 7 days.
<%
for i = -7 to -1
Response.write "<option>" & DateAdd(d,i,Date())
& "<option>"
next
%>
Besides this, even the following code generates an error:
Today=Date()
Response.write DateAdd(d,5,Today)
your guidence is sought, oh great one.
amen Tag: site asp.net with mysql Tag: 265318
Easy vAlign question
Below is my code. It seems that no matter what I do, I cannot get the
following list of places to start at the top of the cell. It is always
centered in the middle of the cell. Is vAlign the correct command for
it to start listing at the top of the cell?
Response.Write "<TABLE BORDER=""1"">"
Response.Write "<TABLE WIDTH=150>"
Response.Write "<TD vAlign=top>"
Response.Write "<TR><TD>" & "<FONT face=""Arial"" size=1>"&
"<Ahref=DurbanSuburbs.asp>" & "Central Durban" & "</A>"
Response.Write "<BR>" & "<FONT face=""Arial"" size=1>" & "La Lucia"
Response.Write "<BR>" & "<FONT face=""Arial"" size=1>" & "Umhlanga
Rocks"
Response.Write "<BR>" & "<FONT face=""Arial"" size=1>" & "<A
href=KZNBerea.asp?link=Mount_Edgecombe>" & "Mount Edgecombe" & "</A>"
Response.Write "<BR>" & "<FONT face=""Arial"" size=1>" & "Glenashley"
Response.Write "<BR>" & "<FONT face=""Arial"" size=1>" & "Durban
North"
Response.Write "<BR>" & "<FONT face=""Arial"" size=1>" & "North Beach"
Response.Write "<BR>" & "<FONT face=""Arial"" size=1>" & "South Beach" Tag: site asp.net with mysql Tag: 265315
Trying to find the author of a script
I use a script to force the browser to save instead of displaying a
simple text file. I downloaded the script some time ago and I don't
remember where I got it from. Does anyone recognize this script and if
so, do you know the author of this script:
------------------------------------
<%
' Constants for Reading Text File
Const ForAppending = 8
Const ForReading = 1
Const ForWriting = 2
Const TristateFalse = 0
Const TristateMixed = -2
Const TristateTrue = -1
Const TristateUseDefault = -2
' File System Objects
Dim FSO
Dim TS
' Server File (this is the REAL name of the file)
Dim strFile: strFile = Server.MapPath("mybas1.bas")
' File to Save As (this is the name you want to tell the browser)
Dim strFileSave: strFileSave = "mybas2.bas"
' Tell Browser what the file name is, so it doesn't try to save as
"default.asp"
Call Response.AddHeader("Content-Disposition","attachment;
filename=""" & strFileSave & """")
' Write out content-type that will FORCE user to SAVE FILE.
' "image/gif" will display in browser
Response.ContentType = "bad/type"
' Initialize File System Object
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
' Open TextStream for Reading
Set TS = FSO.GetFile(strFile).OpenAsTextStream(ForReading,TristateTrue)
' TS.ReadAll DOES NOT WORK. Every Byte must be read and written
individually.
' I think you can read them in Chucks, but this was easier. If
you know how to
' Read chunks... go ahead, read chunks ;)
Do While Not (TS.AtEndOfStream)
' Output MUST be BinaryWrite
Response.BinaryWrite(TS.Read(1))
Loop
' Cleanup, like all good programmers do.
TS.Close
Set TS = Nothing
Set FSO = Nothing
' You don't need this, but I like it.
Response.End
%>
-------------------------------
Many thanks in advance,
Arguich811
Arguich811*digitalice*com Tag: site asp.net with mysql Tag: 265313
What is this ??
Hi guys,
can anyone explain line number 5 to me. i don't quite understand what
is going on there and why.
1 <script language="vbscript" runat="server">sub Application_OnStart
2 getcustomers
3 end subsub getcustomers
4 set conn=Server.CreateObject("ADODB.Connection")
5 conn.Provider="Microsoft.Jet.OLEDB.4.0"
6 conn.Open "c:/webdata/northwind.mdb"
7 set rs=conn.execute("select name from customers")
8 Application("customers")=rs.GetRows
9 rs.Close
10 conn.Close
11 end sub</script>
also what is the meaning of the key word set here. is it an array? is
it a connection ( i ask this cos it gets "closed" later in line 9)
also i presume that customer would need to be declared somewhere as...
dim customers(aNumber). am i correct?
if so, how would i be sure that the size given to the "customers"
array would be big enough?
is there such thing as an array that can hold any number of elements
in ASP?
thanks guys.
Liza Tag: site asp.net with mysql Tag: 265311
Cannot connect to WORD and OUTLOOK anymore after upgrade! Please help..
Thanks in advance.
When running from a remote machine, I was quite able to server-side create
COM connections to WORD and OUTLOOK while using the VB Studio.Net 2002
version using the following style of coding.
Dim myObj as New Windows.Application
Now, after upgrading to VB Studio.Net 2003, I get a very basic error message
"Cannot create ActiveX Object" when trying to access the same application.
When accessing it locally, everything runs fine. It MUST be some
security/rights thing. I have tried all possible combination of setting the
IIS security for the application on the server, but there are so many
options, I thing I am running in circles.
PLEASE, can anyone give me some advise? What have changed betwen versions
2002 and 2003 and what can I do to correct it?
Much appreciated
Heinrich Braasch Tag: site asp.net with mysql Tag: 265308
Where can i find images ??
Can anyone tell where i can get very professional and sophisticated
images for my web sites ( even if i have to pay for them )
thanks.
Liza Tag: site asp.net with mysql Tag: 265278
Please see a .net group. They have "dotnet" in their name. This group is
for classic ASP.
"viviane lima - * - * -" <vivianelima@ligbr.com.br> wrote in message
news:#lPOAKHUDHA.940@TK2MSFTNGP11.phx.gbl...
> How create site with webmatrix with MySql ?
>
> it's possible ?
>
> thanks for help and links examples...
>
> Vivian
> vivianelima@ligbr.com.br
>
>
>