|
Thanks. Setting UserAgent helped.
|
|
|
|
|
Hi there,
I have text coming from a database table field which I want to use for the body of my email massage. But the email must be in plain text format, and not HTML format. How do I get the text to display like as if it is like HTML format. What I means, the following text:
Mr Brendan Vogt wrote:Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon.Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series.
...should look like:
Mr Brendan Vogt wrote:
Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon.
Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series.
I hope you understand?? Any help or advice will be greatly appreciated!
Cheers.
Brendan
|
|
|
|
|
I assume there is a LF or CR/LF after say Vogt wrote: why not simply change them to <BR> when you display in your HTML page?
"An education isn't how much you have committed to memory, or even how much you know. It's being able to differentiate between what you do know and what you don't." - Anatole France
|
|
|
|
|
If you can replace the line feeds with a <br> tag, that is definatly the best way to go. If not, use the preformated text tag. <pre></pre> It may look a little funny (different font, etc), but at least the return characters will be shown.
|
|
|
|
|
I may be completely wrong, but from your message and the one you posted later, I assume that:
1. you are working in classic asp.
2. you are receiving some data from the database.
3. you are creating an e-mail message from the above data.
4. the requirement is that the above e-mail is in plain-text.
If all of the above are correct, use character 10 and 13 to add line field/carriage return. (or vbCrLf).
If not, I am sorry!
As a side note, if you are creating e-mail messages to be processed by SMTP server, make sure that mime type is set to text.
Good Luck!
|
|
|
|
|
Hi,
You are 99% correct! It's no data from the database. It's a string that I have hard coded myself. This is mainly for the people that can view emails only as text. The email component gives me an option of either having the body as HTML, or as plain text. I have chosen plain text, but I am not sure if the tags will work in plain text, don't think so. And I have tried the character 10 and 13, not working either. I will try again the weekend.
Thanks for coming back!!
|
|
|
|
|
Try this:
strBody = "Mr Brendan Vogt wrote:" & vbCrLf & "Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon." & vbCrLf & vbCrLf & "Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series."
|
|
|
|
|
Hi Brendan,
If you are using .net you can replace all your crlf's with
Environment.NewLine
or you can use
\r\n
as well
regards
vaibhav dhandarphale
|
|
|
|
|
Hi there,
I'm using classic ASP!!
I have an input textfield which does not require value in my SQL server database. So it is defined as to allow null values.
So, if the textfield is empty, I do the following check to make it null when adding it to the database. I don't like inserting empty strings:
Dim strDialCode
If Trim(Request.Form("txtDialCode")) = "" Then
strDialCode = Null
Else
strDialCode = Request.Form("txtDialCode")
End If
In my CreateParameter I have the following, which I am not sure if I am doing it correctly:
objCmd.Parameters.Append objCmd.CreateParameter("@ContactDialCode", adWChar, adParamInput, Len(strDialCode), strDialCode)
Basically what should happen is it must be able to accept values, and null values.
In my stored procedure (just a part is displayed) it is defined as follwoing:
CREATE Procedure sp_InsertContact
(
@ContactID nvarchar(16),
@ContactFName nvarchar(50),
@ContactLName nvarchar(50),
@ContactDialCode nvarchar(10),
@ContactTelephone nvarchar(20)
)
INSERT INTO tblContact
(
ContactID_PK,
TitleID_FK,
ContactFName,
ContactLName,
ContactDialCode,
ContactTelephone
)
VALUES
(
@ContactID,
@TitleID,
@ContactFName,
@ContactLName,
@ContactDialCode,
@ContactTelephone
)
GO
Any help or advice will be greatly appreciated!
Cheers.
Brendan
|
|
|
|
|
I am afraid I do not understand the question, but your parameters in stored procedure - shouldn't you be using something like:
@middlename NVARCHAR(255) = NULL
|
|
|
|
|
What I am trying to say is... If the textbox is empty, a null should be written to the database field. So, if I pass the null contained variable to the CreateParameter method, then I get errors. I want to test for nulls before I go to the database.
|
|
|
|
|
ok....
try isNull or isEmpty ...one of them should work! gosh, it's been a while since I used vb!
|
|
|
|
|
Lets say I have a textfield called txtTel. This is an optional field as the user doesn't have to enter a value. So if the nothing is entered I do a small test, something like:
Dim strTel
If Trim(Request.Form("txtTel")) = "" Then
strTel = Null
End If
Then I use this strTel value in my CreateParameter as a parameter. And because it is null, it doesn not work. It does work if if I make strTel = "".
Cheers
Brendan
|
|
|
|
|
can you just not include that parameter in your sql statement?
<br />
If Trim(Request.Form("txtDialCode")) = "" Then<br />
' do nothing<br />
Else<br />
objCmd.Parameters.Append objCmd.CreateParameter("@ContactDialCode", adWChar, adParamInput, Len(strDialCode), strDialCode)<br />
End If<br />
/jason
|
|
|
|
|
I want to create a perl script.
If we run perl script at the end of the day it should check which all users copied, moved or removed the files on the unix server (i.e. the script would be run on unix server). Suppose there r 10 users.
In short i want to know who all used the cp, mv or rm command at the end of the day.
Plz. let me know as soon as possible
Is it possible
|
|
|
|
|
Which shell are you using? I know with bash, as well with others, there is a history file of commands used by a specific user. It would be easy to write a script that would read that and then wipe it out when finished...assuming your shell has a history file, that is.
|
|
|
|
|
My boss would like make peer evaluations done on an electronic basis, he needs each employee to fill out a form like:
-your name "tom"- -person being evaluated's name "bob"-
q1 - response
q2 - response
ect...
The admin should then be able to do a search for "bob" and then a summary report will be made with the questsions asked and every ones responses about "bob"
q1 - "bill's response"
- "tom's response"
but none of the submitted reports should be accesible to other users besides the admin. So how can one submit something then not have access to it? i know its a simple problem but.... gah.. We are on a lan so right now i need to figure out how to keep the users out of a dir but allow them to submit to that dir.... any ideas?
|
|
|
|
|
Backend database with admin group and user group, where admin will have full access and users limited?
A web form with login for admin and users and dispaly summaries only for admin? Remember, when a user "submits", the page is processed on the server side and you can do a lot on the server!
There is more than one way to handle this...some of the others may have some suggestions too.
|
|
|
|
|
thanks guys, i think i've actually found out how to do it, since its on an intrAnet and not public access. I'ma using frontpage (srry... *crys*) to make a .asp page that will submit to a database and I will be using PHP to retrieve info for later reports.
|
|
|
|
|
Hi, all
I want some Design templet to develope web site to use it ...........
so plz send it to me...
samir vohra...
samir_i_vohra@yahoo.com
plz put subjetc line same...boss
|
|
|
|
|
No-one is going to send an email to an anonymous poster. If you don't care enough about this site to register, or even come back to read our replies, why would we bother ?
Your question doesn't make sense to me. What do you want, a design template to build a website in terms of the look and feel ? Using what language ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You can google for template and free .
<italic>Work hard, Work effectively.
|
|
|
|
|
Can anyone recommend a commercial PDF server product?
Apologies for the re-post, first post was in wrong forum.
|
|
|
|
|
Hello all
I am redirect the user to the index page as he login but what I have to do is to redirect him to the same page plese help me
neeru
|
|
|
|
|
which page do u want him to redirect ?
i am not getting your question ..can u clarify a bit more ?
Abhijeet Jadhav
|
|
|
|