| Off topic CDONTS question |
|
 |
Index ‹ asp
|
- Previous
- 6
- Question about sessionhello
In ASp.net application,there are two created session object was attatched to one object,if I remove one of session object , does the other keeps normal or destoryed ? Thanks In advance!!
Code like below
object a = new class()
session.add("A",a)
session.add("B",a)
...
session.remove("A")
Session["B"] = null ???
- 8
- counting question part 2A little while back I had a question about counting records and my
example was something like this:
in my database table i have the following records
john
ed
john
rick
tom
ed
john
and i wanted to know how to count the records so i could display it as
3 john
2 ed
1 rick
1 tom
my end solution, with help from the newsgroup readers was:
select Name, count(Name) AS namecount from Table group by Name
now i want to take it a step further
the table looks like this:
john yes
ed no
john no
rick no
tom yes
ed yes
john no
and i would like to display it this way using asp
3 john 2 no
2 ed 1 no
1 rick 1 no
1 tom 0 no
the yes/no is stored as plain text and I know that if i just want to
count the number of times in total it appears i would do something like
select, count(*) AS answer from Table WHERE answer='no'
and i would get something like
3 no total
but how do i combine what i know to get it to display:
3 john 2 no
2 ed 1 no
1 rick 1 no
1 tom 0 no
thanks
- 8
- Extend Image Selector to also display different href?Could someone help extend this ChangeImage function to also display a
different hyperlink underneath the newly selected image?:
<script language="javascript">
<!--
/*Combo Box Image Selector:
By JavaScript Kit (www.javascriptkit.com)
Over 200+ free JavaScript here!
*/
function showimage()
{
if (!document.images)
return
document.images.pictures.src=
document.username.u_BrokerID.options[document.username.u_BrokerID.selectedIn
dex].value
}
//-->
</script>
<form name="username" method=post action="join_step4.asp" onSubmit="return
CheckForm();">
<SELECT NAME='u_BrokerID' size='1' onChange='showimage()'><OPTION
VALUE='0'>--Select a Broker--</OPTION><option
value="/catamaranco/images/brokers/john_2.jpg">John Anderson</option><option
value="http://www.catamaranco.com/images/brokers/staley_2.jpg">Staley
Weidman </option>
<input type=submit value=submit>
</form>
<br><br>
<a href="Site1.asp">Change this url depending on the value of the image
selected in the dropdown?</a>
- 8
- cdonts attachfile as inlineHello,
How to attach a file to an email as an inline element ?
Code:
objMail.AttachFile Server.MapPath("./path_to/image.gif")
The result:
Content-Type: image/gif;
name="image.gif"
Content-Transfer-Encoding: uuencode
Content-Disposition: attachment;
filename="image.gif"
I'd like the content-disposition to be inline.
Any ideas ?
Thanks
- 8
- Delete record from Dynamic List boxHi,
I have a dynamic list box with all my records. Whan selecting a value in
this box I want to be able to delete the value. but no matter what my
selection is, He always deleting the first record. ??
This is my code:
<form action="<%=MM_editAction%>" method="POST" name="form_remove"
class="content"d="form_remove">
<p>Remove an account
<select name="select_delete" size="1" class="content" id="select_delete">
<% While (NOT reco_itcontacts.EOF) %>
<option value="<%=(reco_itcontacts.Fields.Item("contact_id").Value)%>">
<%=(reco_itcontacts.Fields.Item("contact_item").Value)%></option>
<% reco_itcontacts.MoveNext()
Wend
If (reco_itcontacts.CursorType > 0) Then
reco_itcontacts.MoveFirst
Else
reco_itcontacts.Requery
End If
%>
</select>
</p>
<p>
<input name="Remove" type="submit" class="content" id="Remove"
value="Delete Contact">
</p>
<input type="hidden" name="MM_delete" value="form_remove">
<input type="hidden" name="MM_recordId" value="<%=
reco_itcontacts.Fields.Item("contact_name").Value %>">
<input type="hidden" name="MM_recordId" value="<%=
reco_itcontacts.Fields.Item("contact_id").Value %>">
</form>
- 9
- Search Engine ListingsPosted this on another board, but evidently it was off-topic there...hope you
folks will be able to provide some guidance.
I've been working on a Web site for a business (my first non-personal site)
and I want to help my client get the best search engine listing. Because this
is my first for-profit site, I'm not sure what I need to do for optimal
search engine placement. I've been poking around the Web, and I think I have
a good start, but there are a few questions still remaining:
1) What do I need to do in order to actually GET a page listed in a search
engine to begin with? Do I contact the search engines somehow, or are the
listings somehow updated automatically.
2) I've seen tips that advise putting meta keywords, etc., on EVERY page on
the site. However, we want users to only come to the site via the "front
door" - the index page. I don't see much reason to put a bunch of keywords on
a page that might be the third part of an application process - coming to the
site on that page would cause visitors to be confused. If I limited the
search engine keywords to just the index page, would that hurt the listing?
--
Hmm...they have the Internet on COMPUTERS now!
- 9
- upload user defined folder and files??I am using aspload to allow users to upload three files - 2 pics and a word
doc. The files have standard names but I want the user to define the name of
the folder.
Is there and efficient way to make sure that the user does not choose
illegal characters for folder names? I am doing a series of replaces at the
moment.
Thanks for any ideas.
John B
- 11
- ASP Based Online Shopping Cart For Clothing Website !Hi,
I am looking for an ASP based online shopping cart for my upcoming
clothing website. Of all the features it should have 2 main features as
in Size and Color. It should allow me to specify the available sizes
and colors for that particular item.
I am not sure if I am posting in the right category. Still I am waiting
for the answers.
Best Wishes
Lovely
- 11
- How Do I approach?Hi All,
I have provision for Live Demo in my website.
The user has to select the date and time for the Live demo in my website. My
problem is all the users are selecting the 1st available date & time.
Currently my date field is 3 drop down combo boxes which I am planning to
change to a calendar control and the time is 2 combo box with hour and
minute.
To get rid of the SAME TIME Selection by users I want to provide only the
date and time that are available and free. Mean I have to save the Demo
request Date and Time somewhere in Text file or Database.
Please suggest how do I go for this and what should be best path to
approach?
Thanks
Prabhat
- 11
- cut something from a stringHi!
I guess this is easy, but I ask anyway :)
How can I cut 'www.' and '.no' or '.com' from a string?
example input:
www.norway.no
www.somewhere.com
I want this output:
norway
somewhere
How can I do this?
Best regards,
Christopher
- 14
- Quick Q regarding querystringsI'm probably missing something stupidly obvious here but, I've been trying
to figure out how the likes of aspfaq.com etc, do the following;
<domain>/?querystring
I've tried everything I can think of, aswell as (obviously) checking for
this in the default.asp file, Anyone fancy getting rid of my brainfart for
me please?
This is what I put in the default.asp test file;
<%
s = request.querystring("s")
if s = "" then
'// do nothing
else
'// show it
response.write s
end if
%>
.... rest of page content
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
Personal favourites
Practically Nerded - http://mvps.org/PracticallyNerded/
Bugs, Glitches n stuff - http://mvps.org/inetexplorer/Darnit.htm
Calendar of Updates - http://www.dozleng.com/updates/index.php?&act=calendar
- 14
- MS Access Query Search Fails on BooleanI have a query that I would like to search on where my field is a boolean.
This is the error and the sql statment below,
Error: No value given for one or more required parameters.
SQL : SELECT * FROM [tablename] WHERE Red-Flag = True
Appreciate any help on this, since I am new to SQL.
Thank!
jt
- 15
- ServerXMLHTTP and question marks ProblemI am having a problem with the following code:
Response.CharSet = "UTF-8"
url = "http://www.domain.com/myisapi.dll"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "POST", url, false
xmlhttp.setRequestHeader "Content-Type", "text/HTML"
xmlhttp.setRequestHeader "CharSet", "UTF-8"
xmlhttp.send "param=1"
txt = xmlhttp.responsetext
The request is sent properly to the page (myisapi.dll) but the returned
valued is not correct!!
Characters over 127 ascii, will be converted to question marks, even though
I changed the Response.CharSet
To test it, you can change the code to the following:
Response.CharSet = "UTF-8"
url="http://www.google.fr/"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.setRequestHeader "Content-Type", "text/HTML"
xmlhttp.setRequestHeader "CharSet", "UTF-8"
txt = xmlhttp.responsetext
You will see some question marks which got converted since they were over
127.
Any ideas!!!
Dana
- 16
- Writing to ExcelHI All..
I have an asp page that queries a database and displays a report. There is a
button on this page that I would like to dump the report into Excel. The
code behind the button:
var xl = window.open("/reportexport.asp", "_blank");
and a new window is displayed with excel. Now the problem is how do I get
the report html into this new window?
xl.document.write(window.document.body.innerHTML); is obviously not the way
since it doesn't work.
reportexport.asp contains only two lines:
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "filename=report.xls;"
Any help will be appreciated..
Thanks
- 16
- IE produces 404 Error when calling ASP page, but only on some machines...Hi all,
We are currently facing a strange problem.
We wrote an ASP application using some sessions and database-connectivity,
nothing special.
On some machines (we are all using IE5.5 / IE6) those applications produce a
404 error.
The pages that are called do exist (I checked it thousands of times and it
is only happens on some machines).
Most of the machines have no problem with that pages and do not produce any
errors which makes me belive that it is no real programmed problem.
The strange thing is that a reinstallation of IE mostly helped and if not we
reinstalled the complete computer (as you can guess this is no real suitable
way ;))
Maybe it has something to do with the sessions we use, but they are not so
big.
I hope (not for the one who really has) that somebody has also experienced
this kind of problem and can point me into the right direction.
I also tried different IE newsgroups but they had no idea, that's why I now
try to ask ASP-programmers.
Any help or ideas are kindly appreciated
Thanks in advance
Andreas Bretl
email***@***.com
|
| Author |
Message |
Chris Kennedy

|
Posted: 2004-2-26 17:17:00 |
Top |
asp, Off topic CDONTS question
I have been using CDONTS to send emails fom a database. Unfortunately the
database hasn't gotten quite large with lots of bad addresses. Can anyone
point me in the direction of good list server solution. Also I would want to
send the emails as HTML formatted. I have seen aspNetEmail a .NET component
which combines with list management features. You can send a web page as an
email with all the images embedded. This would be a great for our web
designers. They could just design the the web page and we could point the
aspNetEmail compenent at it. How efficient would this be and are there
better solutions out there. Regards, Chris.
|
| |
|
| |
 |
| |
 |
Index ‹ asp |
- Next
- 1
- "Internal 500" error vs. a helpful messageWhy does my IIS6 server sometimes give me very good error messages
from the VB/ASP interpreter... but mostly give me "Internal Server
error 500" messages?
Is there some way to force it to give the better error message all the
time? the 500 error is totally useless... time to hunt and peck. But,
I make a minor tweak in the code, perhaps 'fix' something very small
and I get "real" error message. Seems totally random as to which I
get.
Thanks,
- 2
- TOAD: Create a code statement modThis may be slightly off topic, but this is probably a better place to
ask than an Oracle group as folk here are more likely to use the
feature I'm asking about.
In Toad (Quest Software) there is a button called 'Create a code
statement' that turns SQL into something you can use in ASP for
building SQL strings:
For example if in Toad you highlight the following, and click the
button:
SELECT
name,
address_line1,
address_line2,
county,
city,
postcode
FROM
address_table
WHERE
city = 'Birmingham'
It copies this into clipboard:
SQL = " SELECT "
SQL = SQL & " name,"
SQL = SQL & " address_line1,"
SQL = SQL & " address_line2,"
SQL = SQL & " county,"
SQL = SQL & " city,"
SQL = SQL & " postcode"
SQL = SQL & " FROM "
SQL = SQL & " address_table"
SQL = SQL & " WHERE "
SQL = SQL & " city = 'Birmingham'"
This is a nice feature (and there is another button that does the
reverse), but I like to build my SQL like this:
Dim aSQL()
Redim aSQL(8)
aSQL(0) = "SELECT "
aSQL(1) = " name, "
aSQL(2) = " address_line1,"
aSQL(3) = " address_line2,"
aSQL(4) = " county,"
aSQL(5) = " city,"
aSQL(6) = " postcode"
aSQL(7) = "FROM "
aSQL(8) = " address_table"
aSQL(9) = "WHERE "
aSQL(10) = " city = 'Birmingham'"
sql = Join(aSQL,"")
Erase aSQL
Anyone know if Toad can be modified to create the array above instead?
I cant find any information about this anywhere.
TIA,
Colin
- 3
- Sending mail with JMail questionHi:
I'm trying to send a message using JMail with the following ASP code
(using ADO to connect to MS Access database). :
____________________________________________
Set objRS1 = strConnect1.Execute(strSQL1)
Dim msg, varRecipient
Set msg = Server.CreateObject("JMail.Message")
msg.logging = true
msg.From = varEmail
msg.FromName = varName
While Not objRS1.EOF
msg.addRecipient objRS1.Fields("StudentEmail")
objRS1.MoveNext
Wend
msg.Subject = varSubject
msg.Body = varMessage
msg.Send ("mail.myemailserver.com")
Set msg = nothing
_________________________________
The code gives an error saying the server did not receive the message,
or sometimes it goes through but the email is not sent. I did a
response.write in the loop just to test it was getting the email
addresses all right from the database and it was. Any idea what is
wrong? BTW, I am not spamming, this is a newsletter for people who
signed up for said newsletter.
- 4
- set position and size of new window openned from hyperlinkSeems like this should be easy to do-need to set the position and size of a web form that is opened from a hyperlink column in a datagrid. I was guessing I could set properties in the webform properties box but did not see any for size
Also thought possibly I could set this in the page load event but do not know what class to use
Thanks Paul.
- 5
- IP address and a pollI only let them vote on my poll once. I set a cookie and put there IP in my
database. Then I do a select to see if there IP is in the database and check
to see if they have a cookie. Does anyone see a problem with this?
- 6
- format datei have a date stored in my db in this format: 2005-03-15 00:00:00.000
however, i want to display this date on my .asp page in this format: 03/05
is there a quick function to do this?
tmia
jt
- 7
- Scripting.FileSystemObjectHi everybody,
found strange behavior in Scripting.FileSystemObject;
only FileExists() method seems to work fine. All other methods cause browser
to indefinitely wait for something that never come.
Here is a sample code. Proc call "fso.CopyFile oldfile,newfile" seems to
cause client to wait until.....what? If I rem that call everything goes fine
and fileexists method found the file....
Any suggestion?
Thanks in advance.
G.
<%
Dim fso
oldfile=Server.MapPath("/asp/test/old.asp")
newfile=Server.MapPath("/asp/test/new/old.asp")
Set fso=CreateObject("Scripting.FileSystemObject")
if (fso.FileExists(old)) then
%>
Found...
<%
fso.CopyFile oldfile,newfile
else
%>
NOT FOUND...
<%
end if
%>
- 8
- SQL UPDATE Query in ASPI want to update a MS Access Table using ASP, I have made the
connection with the database but I am unable to update it. I am using
the following code:
==================================================================================
<%@Language = VBScript %>
<% Option Explicit %>
<%
Dim Rs
dim product_name
product_name="Hard Drive"
Set Rs=Server.CreateObject("ADODB.Recordset")
Rs.ActiveConnection="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:
\Inetpub\wwwroot\MyWeb\db.mdb;"
Rs.Source="UPDATE Products SET 'Product Name' = @product_name"
Rs.open
%>
==================================================================================
It will be very kindful if someone help me with this.
Regards,
Hasnain Raja
- 9
- Hosting - Today's best sellers with discountsLooking for a good hosting provider?
The following site lists today's best selling hosting providers for shared and dedicated hosting.
http://hosting.woohoow.net
Have fun comparing, and make a good choice!
TIP: 1&1 (Of which I can say they really offer reliable solutions) is currently offering 25% discounts on their hosting plans
--
Posted via a free Usenet account from http://www.teranews.com
- 10
- Format(string.......etcAnyone able to tell me if there's an alternative to the Format function that
VB has? (it appears ASP doesn't support it)
I'm basically (and believe me, I know how stupid this is going to sound)
trying to find a way of getting a file/folder's size to show in something
other than bytes (i.e. KB or MB, depending on what size it is).
I've tried modifying some of my VB functions to ASP compatable, but it
doesn't seem to like them.
E.G. in VB, I use;
something = Format((Fldr.Size / 1024), "#0.00") & " KB"
or
Format((Fldr.Size / 1024) / 1024, "##0.00") & " MB"
Neither of the above seem to work as below;
Response.Write Format((Fldr.Size / 1024) / 1024, "##0.00") & " MB"
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
- 11
- change list selection makes field visible?I have a survey/member form that gathers information.
I would like to have a drop down list on a page that a user selects, either
1, 2 or 3.
If 2 or 3 I would like to show on the form another field for information
gathering
ie: if a user has 1 cat, fields for cat name, sex & age show.
if a user has 2 cats, 2 fields show instead of one for each, and the same
for 3.
Can this be done?? I've been searching everywhere and I think it's related
to the onchange event, but I can't quite figure out how to make this happen.
TIA
- 12
- Right forum? ASP.NET??I have a question about something called ASP.NET, and am hoping this is at least
one of the right places to ask.
When looking at the 'users' on my machine, it shows (as a user) an ASP.NET with
the user account password protected. I haven't knowingly set this up on my
machine and am hoping someone here can tell me what exactly ASP.NET is and how
it created a password protected user account on this computer.
If this is not the proper forum to ask, I apologize.
- 13
- ASPX page is not updating to flect changes made to an includeBob,
Ok, this is what I am trying to do. I have an internet page that is coded in
aspx that contains this code in it <!--#INCLUDE FILE="C:\TEST\Index.htm" -->,
which calls text from the index page to display in the aspx page.
Furthermore, I have an upload page that allows a user to type a word document
and save it as "Index.htm". Then the user uploads that to the server located
here "C:\TEST\Index.htm".
All of that works fine; however, when the user uploads that page then the
aspx page does not reflect the changes that were made to the Index.htm page.
Now, I can logon to my server and open the aspx page,which contains the
<!--#INCLUDE FILE="C:\TEST\Index.htm" --> in it and hit save and when the
user goes to the aspx page in their browser then they can see the changes
made to the include file.
The problem is I am wanting to add code or something to this aspx page that
will auto update and show the changes to the Index.htm page that it includes.
Thanks,
Brandon
"Bob Barrows [MVP]" wrote:
> Brandon wrote:
> > Hi,
> >
> > I have an aspx page
>
> There was no way for you to know it (except maybe by browsing through some
> of the previous questions in this newsgroup before posting yours - always a
> recommended practice) , but this is a classic asp newsgroup. ASP.Net bears
> very little resemblance to classic ASP so, while you may be lucky enough to
> find a dotnet-knowledgeable person here who can answer your question, you
> can eliminate the luck factor by posting your question to a group where
> those dotnet-knowledgeable people hang out. I suggest
> microsoft.public.dotnet.framework.aspnet.
>
> > that has the "include" code in it which includes
> > another page that displays information. I also have an upload page
> > that allows users to upload a simple html document onto the server.
> > The include code calls that html page to display the text on that
> > page. The problem is when the user uploads that html page, the aspx
> > page does not refresh to reflect those changes, even if the user hits
> > refresh in their browse. However, if I manually connect to the server
> > and open the aspx page that contains the code and hit save then the
> > webpage updates to reflect the changes that were made to the include
> > page. Can anyone help me fix this problem?
> >
> >
> I think people will need to see more details in order to help yo. You should
> provide a small repro page to enable people to load the code in their
> websites and see the problem for themselves.
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
>
- 14
- Calculating, Calling & Printing return values ????Hi,
I have a problem with returning a value from an external function.....
My asp page is basically a list taken from a database.
A date record is written from the DB, then all the recordslinked to
that date are listed, then the next date, then the next series of
records, i.e.
< some text here > scheduled for 21/02/06
<record 1>
<record 2>
<record 3>
<record 4>
< some text here > scheduled for 28/02/06
<record 1>
<record 2>
<record 3>
<record 4>
----------------------------------------------------
Within the loop for each record within in each date, a calculation is
done as follows:
CALC = CALC + (RS("ProdCount") * RS("ShipQty"))
At the end of each record cycle within a date range, I want to print
the following, pending what the value of CALC is.
"<font color=dark orange>There are NO units scheduled for this week"
or
"<font color=dark orange>There are " & CALC & " units scheduled for
this week"
.
I think I need to call a function to do this because I whish to print
the result, next to each date header, which preceeds the actual
records, ...... & docalc(CALC) & .......
I created a function, docalc(CALC) in an include file, and assumed that
where I wish to print the result, I just call my function as follows
(which does not work yet ?)
Where & how should I place/create the variable 'CALC' and the function
below ?
<%
function docalc(CALC)
if isnull(CALC) or CALC = 0 then
return "<font color=dark orange>There are NO units scheduled for this
week"
else
return "<font color=dark orange>There are " & CALC & " units scheduled
for this week"
end if
end function
%>
What am I doing wrong. The end result should look something like this :
< some text here > scheduled for 21/02/06
There are 534 units scheduled for this week
<record 1>
<record 2>
<record 3>
<record 4>
< some text here > scheduled for 28/02/06
There are 1163 units scheduled for this week
<record 1>
<record 2>
<record 3>
<record 4>
< some text here > scheduled for 05/03/06
There are NO units scheduled for this week
< some text here > scheduled for 18/04/06
There are 532 units scheduled for this week
<record 1>
<record 2>
<record 3>
<record 4>
-------------------------------------------------------
Appreciate all your help
Thank You
David Gordon
- 15
- (0x800A0415) Expected literal constantFor the life of me I can't see what is going wrong here... Why am i
getting the above error
<%
'DataBase
const DSN_NAME = "ORADBA"
const DSN_SERV = "localhost"
const DSN_UID = "ORADBA"
const DSN_PWD = "ORADBA"
const MM_Prod_DSN = "dsn=" & DSN_NAME & ";server=" & DSN_SERV & ";uid="
& DSN_UID & ";pwd=" & DSN_PWD & ";"
%>
Please note, MM_Prod_DSN is defined on a single line.
|
|
|