473,408 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Missing Default Property, help...

Here is the code, it's not complete of course....I've been inserting
lines as I go to pinpoint the issue.....I understand that the error
message I'm getting (#185 Missing Default Property) is referring to
"textfile" but I can't find any information as to what the default
property SHOULD be....

By the way, I'm working on an online submission form for our intranet
that emails several parties AND THEN appends to a text file for later
viewing by management....I've got the email working, this is the only
"glitch" or current objective if you will....Any help would be
great....Thanks in advance...

<%

' Append to a text file

dim fileobject, textfile

Set fileobject = CreateObject("Scripting.FileSystemObject")
Set textfile = fileobject.OpenTextFile(Server.Mappath("/jax/CS/eucs/text/textfile.txt"),
8, TRUE)
%>
Jul 19 '05 #1
6 2912
Are you sure the line where you are getting this error is included in your
post? The two lines you have included look fine to me. Could you please
include more code, and perhaps the exact line where you are getting this
error?

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"dmiller23462" <dm**********@yahoo.com> wrote in message
news:59**************************@posting.google.c om...
Here is the code, it's not complete of course....I've been inserting
lines as I go to pinpoint the issue.....I understand that the error
message I'm getting (#185 Missing Default Property) is referring to
"textfile" but I can't find any information as to what the default
property SHOULD be....

By the way, I'm working on an online submission form for our intranet
that emails several parties AND THEN appends to a text file for later
viewing by management....I've got the email working, this is the only
"glitch" or current objective if you will....Any help would be
great....Thanks in advance...

<%

' Append to a text file

dim fileobject, textfile

Set fileobject = CreateObject("Scripting.FileSystemObject")
Set textfile = fileobject.OpenTextFile(Server.Mappath("/jax/CS/eucs/text/textfile.txt"), 8, TRUE)
%>

Jul 19 '05 #2
I have now figured out in the course of my code bumbling that I *CAN*
actually append to the file and have done so....What I need to do now
is to append to the text document the fields that have been input from
the HTML form....I will include the COMPLETE page code and please let
me know what I'm missing and how I could go about appending the text
file with fields input from the form....

Code is as follows;
(I have removed certain bits that could be considered "proprietary"
and "confidential")

*****

<%
Mode = request.form("mode")
From = request.form("from")
Ext = request.form("ext")
Subject = request.form("subject")
Body = request.form("body")

if mode = "Send" then

Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "*" ' Specify a valid SMTP server
Mail.From = "*" ' Specify sender's address
Mail.FromName = "Dave Miller - Test Email" ' Specify sender's name

if subject = "" then
Mail.Subject = "Test Email"
else
Mail.Subject = subject
end if

Mail.AddAddress "dmiller"
Mail.AddReplyTo "*"
Mail.IsHTML = True

Dim mail_body

mail_body = "Name: " & request.form("name") & "<br>" &_
"Ext: " & request.form("ext") & "<br>" &_
"Body: " & request.form("body")

mail.body = mail_body & "<br>" &
request.servervariables("REMOTE_ADDR") &
request.servervariables("LOGON_USER") &
request.servervariables("REMOTE_USER")

'Mail.Body = body & vbcrlf & vbcrlf &
request.servervariables("REMOTE_ADDR")

On Error Resume Next
Mail.Send
If Err <> 0 Then
Response.Write "Error encountered: " & Err.Description
End If

End if
%>

<%

' Display a text file

dim fileobject, textfile

Set fileobject = Server.CreateObject("Scripting.FileSystemObject")
Set textfile = fileobject.OpenTextFile("D:\Inetpub\JaxWeb\jax\CS\ eucs\Text\textfile.txt",
8)

%>
<html>
<head>

<title>Comments</title>
</head>

<!-- #INCLUDE VIRTUAL="/_borders/top_nav.asp" -->

<% if mode <> "Send" then %>
<p>&nbsp;</p>

<p>This is a template page that will email to certain
parties and then also append to a file all information submitted
online</p>

<form method="POST" action="fileappends_2.asp"
name="fileappends" onSubmit="validate()">
&nbsp;<div align="left">
<table border="0" cellpadding="0" width="782">
<tr>
<td width="153">Name:</td>
<td width="619"><input type="text" name="From"
size="20"></td>
</tr>
<tr>
<td width="153">Ext.:</td>
<td width="619"><input type="text" name="Ext"
size="20"></td>
</tr>
<tr>
<td width="153">Subject:</td>
<td width="619"><input type="text" name="Subject"
size="20"></td>
</tr>
<tr>
<td width="153" valign="top">Comments:</td>
<td width="619"><textarea rows="7" name="Body"
cols="43"></textarea></td>
</tr>
<tr>
<td width="153" valign="top">&nbsp;</td>
<td width="619">&nbsp;</td>
</tr>
<tr>
<td width="153" valign="top">&nbsp;</td>
<td width="619">
<input type="submit" value="Send Message"
name="Send"></td>
</tr>
</table>
</div>
<input type="hidden" name="mode" value="Send">
</form>
<script language="vbscript">
sub validate()
if trim(len(document.suggest.from.value)) = 0 then
msg = "Please note that you must provide your name" & vbcrlf & "if
you'd like to hear back from us for your suggestions..." & vbcrlf &
vbcrlf & "Continue to send this anonymously?"
if msgbox(msg, vbYesNo, "Please wait!") <> 1 then
window.event.returnvalue = false
document.suggest.from.focus()
exit sub
end if
end if
end sub
</script>
<% end if

if mode = "Send" and Err = 0 then
%>
<h2>&nbsp;</h2>
<p>The following message has been successfully submitted!</p>
<p>Name: <font color="#0000FF"> <%=from%></font><br>
Ext.: <font color="#0000FF"> <%=ext%></font><br>
Subject: <font color="#0000FF"> <%=subject%></font><br>
Comments: <font color="#0000FF"> <%=body%></font></p>
<p>&nbsp;</p>

<%

%>
<%

Do While textfile.AtEndOfStream = false
Response.Write(textfile.ReadLine)
Response.Write("<br>")
loop

end if
%>

</body>
</html>
<!-- #INCLUDE VIRTUAL="/_borders/bottom_nav.asp" -->

*****
END OF CODE

"Manohar Kamath [MVP]" <mk*****@TAKETHISOUTkamath.com> wrote in message news:<#Y**************@TK2MSFTNGP10.phx.gbl>...
Are you sure the line where you are getting this error is included in your
post? The two lines you have included look fine to me. Could you please
include more code, and perhaps the exact line where you are getting this
error?

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"dmiller23462" <dm**********@yahoo.com> wrote in message
news:59**************************@posting.google.c om...
Here is the code, it's not complete of course....I've been inserting
lines as I go to pinpoint the issue.....I understand that the error
message I'm getting (#185 Missing Default Property) is referring to
"textfile" but I can't find any information as to what the default
property SHOULD be....

By the way, I'm working on an online submission form for our intranet
that emails several parties AND THEN appends to a text file for later
viewing by management....I've got the email working, this is the only
"glitch" or current objective if you will....Any help would be
great....Thanks in advance...

<%

' Append to a text file

dim fileobject, textfile

Set fileobject = CreateObject("Scripting.FileSystemObject")
Set textfile =

fileobject.OpenTextFile(Server.Mappath("/jax/CS/eucs/text/textfile.txt"),
8, TRUE)
%>

Jul 19 '05 #3
By the way, the text file that I'm referring to will be an "archive"
file that management can go in and see a history of all submitted
forms....Figure if I give you an idea of the "bigger picture" it may
be easier to relate to this particular situation....
Jul 19 '05 #4
Ok.....I've got one more issue...I've successfully got the file
appending with the following lines of code;

<%

' Display a text file

dim fileobject, textfile

Set fileobject = Server.CreateObject("Scripting.FileSystemObject")
Set textfile = fileobject.OpenTextFile("D:\Inetpub\JaxWeb\jax\CS\ eucs\Text\textfile.txt",
8)

' Append to the text file

textfile.writeline Request.form("name")
textfile.writeline Request.form("ext")
textfile.writeline Request.form("body")

' Close the text file

textfile.close

%>

The issue is that my Internet Explorer browser processes the
information, emails it to the correct email but then takes
FOREEEEEVVVVEEERRRR to give me the confirmation page....It just hangs
and I have to close with Task Manager....It DOES write to the file,
however....Just hangs...Is there anything obvious in my code that
could cause it to hang? I made sure to "close" the file after writing
to it.....Help if possible!
Jul 19 '05 #5
dmiller23462 wrote:
Ok.....I've got one more issue...I've successfully got the file
appending with the following lines of code;

<%

' Display a text file

dim fileobject, textfile

Set fileobject = Server.CreateObject("Scripting.FileSystemObject")
The issue is that my Internet Explorer browser processes the
information, emails it to the correct email but then takes
FOREEEEEVVVVEEERRRR to give me the confirmation page....It just hangs
and I have to close with Task Manager....It DOES write to the file,
however....Just hangs...Is there anything obvious in my code that
could cause it to hang? I made sure to "close" the file after writing
to it.....Help if possible!


Could it be this?
http://www.aspfaq.com/show.asp?id=2180
--
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"
Jul 19 '05 #6
I've got it working....No locking up anymore....I commented out the
following code;

'Do While textfile.AtEndOfStream = false
'Response.Write(textfile.ReadLine)
'Response.Write("<br>")
'loop

It hasn't hung again....Thanks for all help and I'm sure you'll see
more posts from me...

dm**********@yahoo.com (dmiller23462) wrote in message news:<59**************************@posting.google. com>...
By the way, the text file that I'm referring to will be an "archive"
file that management can go in and see a history of all submitted
forms....Figure if I give you an idea of the "bigger picture" it may
be easier to relate to this particular situation....

Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: eddie wang | last post by:
Hi, I got the following error when access an asp page. Please help. Thanks. Response object error 'ASP 0185 : 8002000e' Missing Default Property /downtime_category-old2.asp, line 0 A default...
7
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
1
by: Kun | last post by:
Hi there, I think vs.net missing default name for new form. Scenario: 1. I create new Window Application by default it give me Form1 2. I add Form2 3. In Form1_Load event I try to get form2...
4
by: Marc van den Bogaard | last post by:
hello together, my datarow.item property is missing, i just can accesss the ItemArray property, what is wrong with this? System.Data.DataSet dataset1 = new System.Data.DataSet(); ...
4
by: Rob Meade | last post by:
Hi all, I'm trying to dynamically create the navigation for my web page - I have achieved this at work and whilst trying to reproduce the code this evening at home I'm obviously missing...
3
by: =?Utf-8?B?U3RldmVU?= | last post by:
I want to create tabs in the TabControl that are aligned on either the right or left side, but no text shows when doing this. Is there an issue here or a work around. Text for tabs on top or...
11
by: Andrus | last post by:
I'm implementing entity object which should populate its properties from database when property is first referenced. In RDL reports I use object properties like MyObject.MyProperty MyObject...
8
by: =?Utf-8?B?Q2hyaXMgSGFsY3Jvdw==?= | last post by:
Hi there I've successfully added some .NET validation controls to a page (using <asp:RequiredFieldValidator ...), however when I try to set the 'display' property to 'dynamic', my page then...
7
by: =?Utf-8?B?QU9UWCBTYW4gQW50b25pbw==?= | last post by:
Hi, I have been using the code (some of it has been removed for simplicity) below to allow authenticated (using ASP.NET membership database) users to get a file from their archive area. It...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.