Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Missing Default Property, help...

Reply
Thread Tools

Missing Default Property, help...

 
 
dmiller23462
Guest
Posts: n/a
 
      06-04-2004
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)


%>
 
Reply With Quote
 
 
 
 
Manohar Kamath [MVP]
Guest
Posts: n/a
 
      06-04-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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)
>
>
> %>



 
Reply With Quote
 
 
 
 
dmiller23462
Guest
Posts: n/a
 
      06-04-2004
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",


%>
<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]" <(E-Mail Removed)> wrote in message news:<#(E-Mail Removed)>...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) 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)
> >
> >
> > %>

 
Reply With Quote
 
dmiller23462
Guest
Posts: n/a
 
      06-04-2004
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....
 
Reply With Quote
 
dmiller23462
Guest
Posts: n/a
 
      06-07-2004
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",


' 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!
 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      06-07-2004
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"


 
Reply With Quote
 
dmiller23462
Guest
Posts: n/a
 
      06-07-2004
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...

http://www.velocityreviews.com/forums/(E-Mail Removed) (dmiller23462) wrote in message news:<(E-Mail Removed). 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....

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: default xml icon missing Carlos Windows 64bit 0 05-23-2008 11:36 AM
Crystal Reports - Visual Basic UFL that implements this function is missing (or U2lcom.dll is missing) Les Caudle ASP .Net 3 09-03-2007 02:27 AM
Re: missing feature classes and missing fields Gary Herron Python 2 07-04-2006 10:29 PM
Fixed/default attributes in Xerces: Namespace prefix missing?... VanOrton XML 2 11-30-2005 03:17 PM
Weird behaviour: default.asp missing the dot in sendMail Mike ASP .Net 1 12-29-2004 05:23 PM



Advertisments