Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2005, 11:54 PM
Authorized User
 
Join Date: Dec 2004
Location: , , .
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ALEX_GRIM
Default APPEND TO ALREADY EXSISTING HTML OR ASP FILE?

hey, i' new to vb, asp, etc, but i have a grasp of it. i've been going through google all night and day, been to quite a few vb, asp sites, to no prevail. my problem:
i have a form, and it works fine, it is set to create a new post page with every post, instead of putting it all on the same page. well my problem is i DO want some of my forms to post to the same page, but they are being over written. how do i tell my server i want to APPEND and not CREATE? my ultimate goal with this, is to do something along the lines of what you have here, were i post a comment, it writes it's own page, BUT it appends to the subject to the main category page as well. i've seen examples of poeple doing this, but i don't understand the proper format of a sub in an asp document, so i try to keep my scripting as lite as possable.

GRIM@GRIMMUSIC.COM
WWW.GRIMMUSIC.COM
__________________
---------------------------
A Black sheep moves easy in the darkness.
GRIM@GRIMMUSIC.COM
WWW.GRIMMUSIC.COM
 
Old January 12th, 2005, 06:59 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

I am not clear exactly what you are after

Wind is your friend
Matt
 
Old January 12th, 2005, 10:17 PM
Authorized User
 
Join Date: Dec 2004
Location: , , .
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ALEX_GRIM
Default

ACTUALLY IT'S OK, i just went out and bought a book, (i didn't know wrox wrote books, i thought it was just a website for programmers, neat), for asp, so instead of bother you guys, i can teach myself easier now, instead of trying to learn from tutorial sites. but i DO have one more question, and i don't know if this is the right forum for this kind of question, i'm just asumming this forum also deals with iis isues, since it is an asp forum, but is it common to have certain applications fail to install to server 2003 flash mx, and vb studio 6 will not install, but all my other big programs will? thanks.

GRIM@GRIMMUSIC.COM
WWW.GRIMMUSIC.COM
 
Old January 13th, 2005, 06:30 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

If you are logged in as the administrator and it’s a legit copy I would say that’s strange. If your applications are cracked in correctly I could understand though.

Wind is your friend
Matt
 
Old January 13th, 2005, 09:56 PM
Authorized User
 
Join Date: Dec 2004
Location: , , .
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ALEX_GRIM
Default

actually, i figured it out, the installer files were bad, from transfering them from hddd to hdd so many times. so uh....... what makes you think i'm cracking them? you've heard about me from another forum huh?

GRIM@GRIMMUSIC.COM
WWW.GRIMMUSIC.COM
 
Old January 13th, 2005, 09:59 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Ha ha - no just a guess

Wind is your friend
Matt
 
Old January 14th, 2005, 07:47 AM
Authorized User
 
Join Date: Dec 2004
Location: , , .
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ALEX_GRIM
Default

since i DID find a way to handle my problem, should i post MY soloution here, to help others?

GRIM@GRIMMUSIC.COM
WWW.GRIMMUSIC.COM
 
Old January 14th, 2005, 08:28 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

ALEX_GRIM

;;;Well, i'd apreciate it if you guys don't get anal about it
Are you talking to me? What the hell are you on about, did I miss a post? Please explain?

;;;TWO forums i've been banned from...
Mate, with that type of 'completely un-called for' post I’m not supprized. This forum has some very helpful great minds, once a bridge is burnt its twice as hard to re build.

;;;should i post MY soloution here
Do what you like, however you thread subject should reflect its content.

BTW Are you aware of the rammifications of posting your email at the foot of your posts?


Wind is your friend
Matt
 
Old January 14th, 2005, 10:51 PM
Authorized User
 
Join Date: Dec 2004
Location: , , .
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ALEX_GRIM
Default

WELL yes, i was talking to your and your other mod's, at least i thoght you were a mod. but what do you mean by "uncalled for"? i didn't notice anything out of line, other than a figure of speach i threw in there. but anyway, my code for appending data is forthcoming. and what are the rammifications of posting my email? are you not allowed to do that here?
************************************************** *****

<script language="C#" runat="server">
  void btnSubmit_OnClick(Object sender, EventArgs e)
  {
   // Create an HTML file in the directory strDir
  const String strDir = "WRITE\\";

   String strFileName = strDir + NAME.Text;

   // Create the file using the static method CreateText
   StreamWriter objStream = File.AppendText ("Z:\\WWW\\GRIMMUSIC\\WRITE\\FORUM.ASPX");
   // Write the contents of the txtContents textarea to the stream
  objStream.WriteLine("<BR>");
  objStream.WriteLine("NAME:");
  objStream.WriteLine("<BR>");
  objStream.WriteLine(NAME.Text);
  objStream.WriteLine("<br>");
  objStream.WriteLine("EMAIL:");
  objStream.WriteLine("<BR>");
  objStream.WriteLine(EMAIL.Text);
  objStream.WriteLine("<br>");
  objStream.WriteLine("MESSENGER NAME:");
  objStream.WriteLine("<BR>");
  objStream.WriteLine(SN.Text);
  objStream.WriteLine(" FOR ");
  objStream.WriteLine(MESS.Text);
  objStream.WriteLine("<BR>");
  objStream.WriteLine("I HEARD ABOUT THIS SITE FROM:");
  objStream.WriteLine("<BR>");
  objStream.WriteLine(REFER.Text);
  objStream.WriteLine("<BR>");
  objStream.WriteLine("QUESTIONS OR COMMENTS:");
  objStream.WriteLine("<BR>");
  objStream.WriteLine(COMMENT.Text);
  objStream.WriteLine("");
  objStream.WriteLine("");
   // Close the stream, saving the file...
   objStream.Close();

   // Display a link to the newly created HTML page.
   lblLink.Text = "Page created!<br><a href=\"/WRITE/FORUM.ASPX" +
           "\">SEE WHAT KINDA **** OTHERS POSTED";
  }
 </script>

 <html>
<head><link REL="stylesheet" TYPE="text/css" MEDIA="all" HREF="/CSS.css"></link></head>
 <body bgcolor="#000000"><center >
  <form id="THIS" runat="server">
   <b>YOU ARE IN THE GENERAL FORUM,<br>FEEL FREE TO POST WHATEVER THE **** YOU WANT
   <p>
   <b>NAME</b> <br><asp:textbox id="NAME" runat="server" /><br>
   <b>EMAIL</b><br> <asp:textbox id="EMAIL" runat="server" /> <BR>
 <b>MESSENGER NAME</b><br> <asp:textbox id="SN" runat="server" /><br>
 <b>FOR WHAT MESSENGER?</b><br> <asp:textbox id="MESS" runat="server" /><br>
 <b>HOW DID YOU HEAR ABOUT THIS SITE?<br> <asp:textBOX TextMode="MultiLine" Columns="30" Rows="2" id="REFER" runat="server" /><br>
 <b>QUESTIONS OR COMMENTS?<br> <asp:textbox TextMode="MultiLine" Columns="30" Rows="4" id="COMMENT" runat="server" /><br>

   <p>
   <asp:button id="btnSubmit" runat="server" text="POST THIS ****"
         OnClick="btnSubmit_OnClick" />
   <p>
   <asp:label id="lblLink" runat="server" />
  </form>
</P><br><p><br><p><br><p><br><p><br><p><br><p><br><p ><br><p><br><p><br><p><A href="/WRITE/FORUM.ASPX">.</A>
</CENTER>
 </body>
 </html>



GRIM@GRIMMUSIC.COM
WWW.GRIMMUSIC.COM
 
Old January 14th, 2005, 11:03 PM
Authorized User
 
Join Date: Dec 2004
Location: , , .
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ALEX_GRIM
Default

by the way, in the previous example, you must be sure not to include any blockquotes in your html. see how i did my writeline;

objStream.WriteLine("MESSENGER NAME:");

now say you were refrencing to a target in a frames page, you'd have to use quotes for that, it won't work otherwise. so use the chr(34)=(");

objStream.WriteLine("<a href=my center frame.hmtl target="&chr(34)&"main frame"&chr(34)&">this is a hyperlink</a>");

so this way, the parser reads it like this;

objStream.WriteLine

("<a href=my center frame.hmtl target=" <-it reads that section between quotes,

&chr(34) <-then it concatenates it with the ascii chr(34),

&"main frame" <-then it concatenates it with another block of text,

&chr(34) <- chr(34) again,

">this is a hyperlink</a>"); <-then the last chunk of text(between quotes), and the end paranthases and semicolon.

the result will be printed in an html doc to look like this;

<a href=my center frame.hmtl target="main frame">this is a hyperlink</a>

good luck.


GRIM@GRIMMUSIC.COM
WWW.GRIMMUSIC.COM




Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert html to pdf file by using asp.net in c# dey.susanta.kolkata ASP.NET 2.0 Professional 4 September 19th, 2016 07:20 AM
Queries On File Field Html Control in ASP.NET 1.1 daffodils ASP.NET 1.0 and 1.1 Basics 1 October 30th, 2006 11:30 AM
Executing asp Include file withing HTML content itHighway HTML Code Clinic 4 August 7th, 2005 01:03 PM
APPEND TO ALREADY EXSISTING HTML OR ASP FILE? ALEX_GRIM Classic ASP Professional 0 January 11th, 2005 11:55 PM
ASP code in html file Cinderella Classic ASP Basics 5 September 10th, 2004 03:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.