In line 7, I need to display the results of the variables strFName and
strLName (and have a space in between the two) but I don't know the proper
formatting. If I just use the & then I get the literal strFname instead of
the value. Could someone please show me the correct syntax for this?
I am having a problem formatting an email message which comes from a form.
I am currently having difficulty with the <br> tag which I am using for line spaces within my email. I am getting an expected statement error message which is pointing to the line which is underlined below. I can't think what is causing this.
I'm building an ASP-based CRM system; a user sees the original message, posted from the database and can hit a Reply button to generate a TEXTAREA field on the next page that houses the original messages and allows them to type a reply and hit a "Send" button.
The original message from the database includes natural line breaks, as submitted--it doesn't contain any HTML breaks.
I would like to accomplish two things:
1) Add a "> " before each line of the original message, as contained in the reply
2) In conjunction with the "> " preceding each line, break the original messge string into logical line lengths that fit inside the textarea field and don't wrap.
I am requesting a variable for the users' network username:
<%=Request.ServerVariables("LOGON_USER")%>
This returns the following:
NETWORKJ.Bloggs
Instead I would like it to return J.Bloggs on it's own with out the "NETWORK" bit so basically I am saying how do I cut out the first 8 characters of a variable.
I'm passing a query string from one script to the other via a hidden input. Right now I'm just response.writing the query string out to make sure the query is getting there.
The query string will display no problem if the query has no single quotes ( ' ) i.e. returns: SELECT * from table WHERE int_field = 123 ORDER BY id
But when the query contains quotation marks to handle text it chokes, i.e. returns: SELECT * from table WHERE text_field =
when this should be:
SELECT * from table WHERE text_field = 'textvalue' ORDER BY id
I've tried various arguments with the REPLACE function, but can't get it to work...
i am stuck while trying to display a long string, its not just one string though, itsa field from a database that has a problem solution in it, most data is just how to stuff like:
"do this, install this and then restart and install the new stuff... etc."
but some of the solutions have long links to (for example) servers and there is then maybe 150 characters all in a line and no breaks to make the line break - this makes my table (390 pixels wide) get streched to hell on one side.
i have tried going through the code, counting the characters and then taking a "left" of code depending on how many groups of 50 there are but that breaks words in half and thats looks nearly as bad.
I had a problem with my webspace provider and CDONTS so I gave upon that front. I am now trying JMail which seems to be working, so now I need to transfer all my formatting from CDONTS to JMail.
I have a question on the formatting of a Jmail email.
I have the following snippet of code which details the variables and contents of the body of the email
I want to insert a line break/paragraph between Request.Form("surname") and Request.Form("number"). As you can see I have tried dong this with <p> tags and also <br>'s. However the tags are outputted into the email and not acutal line breaks.
Any ideas as to how to format the body of the email?
I have a string of HTML (used for a specific purpose) that I'd like to use somewhere else but as plain text. Rather than introduce a specifically created plain text version I'd like to strip the tags code from the HTML version. This in itself is easy, using a function such as:
Function HTMLDecode(Expression) Dim sTemp sTemp = Expression sTemp = Replace(sTemp, ">", ">", , , 1) sTemp = Replace(sTemp, "<", "<", , , 1) 'Repeat for each defined entity HTMLDecode = sTemp End Function
However, the difficulty comes when trying keep each paragraph seperate. For example, the string "this is<p>my name" shows on screen as:
this is
my name
if I use the above function, it strips out the <p> tag and shows the result on one line:
this is my name
I thought I could use something like:
str = replace(str, "<p>", chr(10))
but that doesn't seem to work. Can anyone help me replace <br> and <p> tags with something that's recognised as "plain" text but will keep the paragraphs and new lines formatted correctly??
All of my previous web page work has been done with .html and Cold Fusion. My new host does not support cold fusion but does have ASP 3.0 and ASP.Net 1.1. They've told me that I have to use CDO.Sys for sending email. I've spent the past 3 days doing all the research I can find but most of the examples assume a basic knowledge of ASP (which I am severly lacking in).
I have a simple .html form (4 fields) that currently DOES get sent through email (although it is sent as plain text). I would like to be able to send an email that is formatted into html (allowing me to use tables, images, etc.
Here is what I have so far (I've commented out the "text" based part and am trying to send as an html email now).
i have many different variables like addr, addr1, addr2 addr3 etc and i want this to occur
if addr = "" then error = "ERROR:You have not entered all the required information. <br>Press the Back Button on your web browser and try again." Response.Write error
But that only works for addr. Is there any way to include addr2 and the rest of the variables in that statement without writing it out 50 times
Is there a way i can send variables to an included page other than the session. I know about doing it via the session but i find that a bit messy and it might affect system performance.
can i use server.execute (my.asp?id=6) or something similar ?
I have to include a menu on the side of every page that looks different depending on what page is being displayed so i need to find a way to do this properly.
What are the best methods for using global constants and variables? I've noticed that many people put all global constants in a file and include that file on every page. This is the best way of doing it - is it not? Once the application has loaded the page it is cached and is immediately available for other pages.
With global variables - the best thing to do would be to use application variables - so long as there weren't too many declared. Is there another (easy) way of using global variables apart from using application variables?
It seems that a variable cannot be assign to HTMLBody field. Am'I doing something wrong?
- this line write a bold html phrase in the email body ..HTMLBody = "<HTML><HEAD><BODY><B>Here is the text body</BODY></HTML>"
- this line produce an empty body. The variable TableData contains all the required HTML to construct the table. I Use Response.Write and see all the code in it
Basically the way it SHOULD work is a fixed sized window opens and displays two tables. The top table (id=fgWindow) displays the graphics; the bottom table has dropdown menus and text boxes.
I can make every item in the bottom window show up in an email (the Sub Button_Click), however I remain unable to get it to put the contents of the fgWindow table into the body of the email.
My only BIG question is, why won't it put the table that I have ID'd as "fgWindow" in the body of the email when I send it? Code:
Could a single CDONYS e-mail have both an htmlbody and a textbody??... You know sort of like what Thunderbird does to ensure best compatability among different platforms.
I finally figured out how to get my form to its database and have an email come my way. However I am now trying to set up the body of the email to include the form details. However the body of the email that is sent only includes the last line of the "body" tag and has no details next to it. Code:
How do I email session variables in body of email:
example---------------------------------------> <% Set myMail=CreateObject("CDO.Message") myMail.Subject="HELP" myMail.From="someone@somewhere.com" myMail.To="someone@somewhere.com" '----------------------------------------------------------> 'Do not which to use if any. I want to put the variables in the body of the email.
I need to get the userName from an Email address. For example, if the email is Join Bytes!, how can I can I get just the "username" part using the RIGHT() or LEFT() functions?
I have a page that pulls data from a database, one of the fields is Notetext which frequently contains an email. I then want to pass this onto another page, that updates the email field in another database, so in page 1:
It all works fine except that only about half the email gets copied into the other database. It's not an issue with the database as it can take that length of characters.
So my question, Is there a limit to the number of charachters you can pass from one page to another in a string? and if so is there any way of increasing this or getting around it?
I'm having a problem with passing variables inserting to my database. Here's what I'm doing. I have a page where the user selects a team member (this is fine) Once the team member is selected I have the variables on the form send and email to all supervisors and the member selected (this is fine also) BUT, I'm having problems inserting the emailed information to my access 2000 database after is email. Can someone guide me in the right direction.
However I cannot seem to code this into the html string in the correct syntax, to where id=1 or id=2, etc. Does anyone know the anwser to this problem?The basic code I am using can be found below.
html = html & "<a href=""http://www.synergeticsusa.net/admin/shop_cart/detail.asp?id="">" html = html & Session("MM_UserID") html = html & "<IMG SRC=""myImage2.gif""></A><BR><BR>" html = html & "</br>"
I want to be to call my menu from another file onto my page so that i dont have to add it to every page of my website. The problem is when i try to add it using the include method it says that only one include file is allowed on an ASP. The other include file is my connection string so i cant really take that out of the page because then nothing else will work!
How can i get the menu page included as well as the connecting string?
Have added the code below, i have highlighted the 2 include files that i want to use in blue, i have also left the div tag in for where i currently have the menu which is what i want to take out and have ther include file there instead, if that makes sense. Basically the bit in red i want to be able to remove from all of my pages and add the blue file above the red code in instead, but i dont know how!!!!! Code:
I'm developing an Asp.NET system to take a CSV file uploaded via the web, parse it, and insert the values into an SQL database. My sticking point comes when I try to split() the string returned by readline() on the file.
The following code snippet works for me: tokens = "one,two,three,four".Split(",") for each token in tokens response.write("<td>"+token+"</td>") next
However, if I take the next line in the CSV, read using StreamReader.ReadLine on the PostedFile.InputStream, I receive "Object reference not set to an instance of an object." which I have narrowed down to be my string holding the line. Further investigation reveals that no other string member functions work on my line (.ToCharArray, .ToString, etc).
I suspect that StreamReader.ReadLine is not correctly returning a string, even though Response.Write(line) displays what I would expect .....