Formating Text

When i send a text string to my database linebreaks are stored, but when i call it from asp to the page all linebreaks are lost.
this will reformat text to look different than i was initially typed, how can i make the text shown on webpage in orginal formating.
hope im clear on this or ask and i will elaborate.

View Replies


ADVERTISEMENT

Formating URL's

I would like to format URLS that are being retreived from a database. Here is an example:

bodytext="this is some text http://www.sitepoint.com/ this is some more text"
response.write(bodytext)

how could I change the URL (http://www.sitepoint.com/) to a link? So instead of http://www.sitepoint.com/, it would be <a href="http://www.sitepoint.com/">http://www.sitepoint.com/</a>. There are going to be an infinate amount of URL's (the user can type in any one) and it is just not the URL by itself.

View Replies View Related

Formating Year

I want to be able to format a year as mm/dd/yy

formatdatetime does not work because the year is yyyy. How do I format a 2 digit year such as 04 for 2004?

View Replies View Related

Date Formating

does anyone know if there is a function to format date?When my date is extracted from database, it is in decimal format (ie.38233.72078), is there a way to convert this number to date formate using asp?

View Replies View Related

Formating Strings

I have a list of dates in a sql database that are input as varchar like this 042999

How do I insert / in between the date/month and year

so this 042999 will appear like this 04/29/99

View Replies View Related

Variable Formating

Having a pretty annoying format 'error'

The below code works fine,

strMessage = "Logged in as: " & Session("UserName") & ""

but it displays as:

Logged in as:
'Username'

Were as i want it to be:

Logged in as: 'Username'

Any ideas how to make it go to one line?

View Replies View Related

Keeping Formating

I posted before about replacing special characters (esp. '). However, I am wondering how formatting can be kept when entering it into a textbox to store in a database?

When text with seperate paragraphs is entered, it comes out as one big paragraph later on.Is there anyway to address this? When I was doing my searching - somethign about chr(10) kept coming up, but I am not sure what this is.

View Replies View Related

Formating % On An Page

I have an ASP page taking data from a table. I would like that the data is shown as a % (like 51.456897%) All it shows with my code below is 0.51456897.

Can someone tell me how to change the code so that my % is shown? ....

View Replies View Related

Imported Time Formating

I am importing a time into a sql datetime field from a text datafile using vbscript in an asp file. The time coming in will look like 8:00 or 3:30 or some other similar thing.

Because it is doesn't have am or pm associated with it, I have to force the issue or sql will assume am all of the time, and I am sure that no judge in our county is going to hear a case in the middle of the night!

So I have to add 12 hours to anthing that could be an afternoon time before I add it to the database to keep it from looking stupid in the display screens.

View Replies View Related

Formating A Number With Own Function

if we use formatnumber library function in asp it will format the no as per the number format defined in the locale of the server. For example:

some number format look like this 34,135,200 (comma seperated)
some looks like this 34 135 200(blank spaces seperated)

so does anybody have a vbscript function which do this job.

View Replies View Related

Response.write Formating

I have the following variable being displayed but i would like it displayed in the default font and text size 2 how is it done?

<% response.write(sUserId) %>

View Replies View Related

Date Function Formating

Is there a way to output a date in latin american format?

You know the day first, the month second and the year last.

View Replies View Related

Number Formating Decimal Places Not To Remove Zero 0 At The End

I have a report that will format a number to the last 2 decimal places. However it will trim off the 0 at the end. Example.

98.90 is formated to 98.9

how can i tell the format number function to not trim the 0 but still have the last 2 digits.

View Replies View Related

ASP - Date Formating MySql Insert/update

I am storing dates in a mySql database in the format yyyy-mm-dd. Now, I have set up so that this field is insert by a form.

It isn't very user friendly to have to type yyyy-mm-dd, how can I set up so that the user can enter format dd/mm/yyyy and it will automatically insert into the database as yyyy-mm-dd? I am using Dreamweaver MX 2004 and ASP.

View Replies View Related

Number Formating :: Adding Zeros In The Beginning

I have a querystring that passes through the value 001 for example, the form on the receiving page need to display that number but with 1 added to it. i have

dim strnum
strnum = request.querystring("value")
strnum = strnum + 1

when displayed <%=strnum%> shows 2 instead of 002, and the zero's are very important, is there any number formating trick i dont know or another way of doing this?i thought about coding the first two zero's in before i call the strnum but this would mess things up when i get to 010 etc.

View Replies View Related

Controlling Text In A Text Area Or Text

I have this problem in controlling a the text in a Text Area. How can I do
that for example the field size is 200, when it reaches 50 it automatically
goes to the next line. Bcoz im having problem when viewing it in my report,
it continuesly views in a strieght line and im having problem in printing.

View Replies View Related

International Text And FSO Created Text Files

When using ASP's FileSystemObject to create text files, I am unable to get user submitted text (in Hebrew) to save as anything other than "?????". The text file is being saved in Unicode and setting the CodePage in ASP proved unsuccessful. Strangely, hard coded Hebrew text in an ASP variable does add to the text file correctly.

Any ideas of why this happens and how to get it to work correctly?

View Replies View Related

Text Area Limited Text

I have a text area which I want to limit the number of words or number of text entered into it. Is this possible?

<textarea name="textarea" cols="35" rows="5"></textarea>

In the text area above, can I say limit the person filling in the text area to say 100 characters?

View Replies View Related

Text Box In Form Cutting Text

I have a form on asp page that pulls info from a DB when the page loads.
It them puts the info into text boxes on the page that are editable by the
user.

The only problem I have is say in the description text box it should
read "HP Laserjet 5Si" , it always cuts the text off where it just says "HP"
.. It does this on all the text boxes? I can't seem to figure out why it
is doing it. Here is the sample code:

With quotes around <%= vdesc%>

<td><input name="desc" type="text" id="desc" size="45" value="<%=
vdesc%>"></td>

And I tried it without.

View Replies View Related

Regular Expression Of Text OR Text OR Etc...

I have text in a field coming from a database. The text has various
forms such as:

text1
text1 or text2
text1 or text2 or text3
text1; or text2
text1; or text2; or text3
etc...

how can I parse this with a reg ex? I tried this:

(.+);? or

but it only captures 1 submatch (text1) and only if theres an "or"
after it

I'd like to get 1 submatch for each piece of text separated by the
"or", just the text itself if there is no or.

Anyone know how to do it?

View Replies View Related

Controlling Text In A Text Area

I have this problem in controlling a text in a Text Area. How can I do that, for example the field size is 200, when it reaches 50 it automatically goes to the next line. Because im having problem when viewing text in my report, it continuesly views in a straight line. Can you give me ASP code for that.

View Replies View Related

Hover Over Text To Bring Up Text

I have text - ARI Promise, when I hover over the text I would like a box to appear with the Promise information. It would be several paragraphs that need to be formatted with paragraph and bullets. Is this possible to do? If so how would I go about it?

View Replies View Related

Display Text In Text Box

I have a search page, after search returns value I want to display fields in text box instead of table.

View Replies View Related

Error In Asp Text: Command Text Not Set For The Command

I am getting the above error in an asp page. Not sure why? The error details is given below. Code:

View Replies View Related

Text Box

I'm trying to make a text box for comments. I know how to put one value into a text box like name, but i'm not sure how to pull multi-values. I want to be able to display the time,user and comment in a text box. I don't know how to go about this. The comments are stored in a different table and there can be many comments for one policy.

What i did was i have asp code the displays all the comments and puts it into a table, but i want to put this into a text box not sure how to go about it. Here is the code i'm using. the reason why i need it to be in a text box is so the user can update it, does anybody have any ideas. Code:

View Replies View Related

Text Value

I have a drop down as below.

<select id="drp1">
<option value="1">One</option>
<option value="2">Two</option>
</select>


I need the text value of the drop down box.

Request.form("drp1").value is giving 1 , but I need the value "One". How can
I do this.

View Replies View Related

Text Box

1) How do I check for a text box with a null value?
2) How do I check for a text box that doesn't have a valid number/ integer inside it?

View Replies View Related

Text Box

I am trying to create a text box in ASP which automatically populates itself with the person's name who is currently viewing the page.I want it to retrieve the name from Active Directory.The text box populates itself when the page is loaded.
The Active Directory code for name is 'cn'.So when logged on users name = 'cn' display the name in the textbox.

View Replies View Related

Put Text From

I'm putting a standard mail page together, that will allow my users to
sent templete emails out to people.

The files are stored in textfiles.I have come up with a script to produce the names into a Select list, but know i'm wanting them to be read into a textarea box,to allow me to submit them into from the form into the sendmail.asp page! but the only way i can pass them out, is into a iframe, whichd oesn't seem to allow me to then pass them into the sendmail.asp page.

View Replies View Related

Getting Text Into SQL

I have an ASP page to be used as a Softball Roster. The user will enter their roster information and the information will then go into a SQL database. My problem is this... I keep getting this error "String or Binary Data would be truncated". I figured out what this message meant and I have printed my variable to the screen to see what I get.

As an example what I get for my variable PlayerFirstName is Joe, John, Henry, Alex. I only want one name at a time so that I can import them into SQL. How do I parse my line apart so that I can loop through it and pull off only one item at a time and put it into SQL?

View Replies View Related

Text File

how can i write a line to a text file? also, how can i put every line of a text file into an array - and see whether a value mathes any of the lines in the array?

View Replies View Related

Non Editable Text Box

I'm writing an intranet and I need to put something like a non-editable
scrolling text box on the home page where daily announcements can be placed.
I've tried adding a scrolling text box, but I am not sure how to make it
non-editable.

Is there any way I can fill the textbox using something like
textstream? I would imagine one person in the organisation would be in
charge of adding this text somehow. I'm a bit lost in trying to find the
best method.

View Replies View Related

Text Processing

Do you guys know how to parse an input(text) to verify if it contains special characters. The input should accept numbers or letters only.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved