Display Source Text
I want to read an ASP file and display its source text.But I only get its HTML output. Later on,I will extract that source text to display certain thing.
Here is my code:
Const Filename = "/aspBoard.asp"
Dim FSO
set FSO = server.createObject("Scripting.FileSystemObject")
Dim Filepath
Filepath = server.MapPath(Filename)
Set TextStream = FSO.OpenTextFile(Filepath)
Dim content
content = TextStream.readall
Response.Write content
TextStream.Close
Set TextStream = nothing
View Replies
ADVERTISEMENT
I'm just trying to set up a testing server via Dreamweaver that is my local box. HTML works fine and ASP works fine IF there is no js code input. I can save a few images in a table as an ASP page and it works great, but if I try to pull a table from a database, the browser suddenly displays the code, rather than the page.
I've heard some people referring to articles that might address this, but so far I'm not seeing them.
I have .asp files being handled by asp.dll from the internet information services section.
What the heck am I missing? What else should I provide y'all so we can brainstorm this?
View Replies
View Related
can i get an example of how to read values from a text file that will be used as links on my page. i'll have a .cvs file ala:
LINK ASP_PAGE
"click me1", "clickme1.asp"
"click me2", "clickme2.asp"
"click me3", "clickme3.asp"
i think i can figure out how to do the read, but need to know how to get it on the page where i need it.
View Replies
View Related
Can anyone tell me how to display just the first few words of the data. For example:
The full text:
Hello, how are you? What are you currently doing and hope you have a good day. Merry Christmas and A Happy New Year.
I just want to display:
Hello, how are you? What are you currently ...
I am not very familiar with the asp coding for displaying part of the message.
View Replies
View Related
I need to write a code where if the user selects a radio button depending on that i need to display the text. can any one tell me how i can do this ?
View Replies
View Related
What im lookng to do, is display a message if the user searches for a product that doesnt exist in the database. So if they look for a particular book, and it returns nothing, they get a sorry we dont have it in stock message.
View Replies
View Related
I have a form that contains 5 text boxes and user enters values inside them and then press the submit button (checked.gif) and inserts them in the database. In my page there is also another button (fakos.gif) that when the user press it supposed to take the values from the text box that the user JUST entered the value and display it in another page (before submiting the elements).
View Replies
View Related
Im having this problem, I have a database and a text field on it. When I try to display the text into a web page it thosen't do the correct paragraph, etc..
Exemple:
Text on the database:
"This is a test.
please read.
Thank you very much"
What apper on the webpage is:
"This is a test. please read. Thank you very much"
Everything in one line insted of four.
View Replies
View Related
My problem is that when I´m typing a text data in to the form and I press Enter to go
to a new line in PHPMyAdmin the field looks like this:
line1: text
line2: text2
etc.
But in ASP it looks like this:
line1: text1 text2
View Replies
View Related
K i have a string which is
id1, id2, id3, id3, id3
ive split them and put them into an array and only want to show each item once Like:
id1
id2
id3
instead of showing:
id1
id2
id3
id3
View Replies
View Related
I got a form (textarea); user can input details of the property. And I am saving it in database. I need to display it in the site. text should be formatted. For example
Thi is how user enter details in texarea Code:
View Replies
View Related
when I´m typing a text data in to the form and I press Enter to go
to a new line and after when the data is submited in the DB I go to PHPMyAdmin and the field looks like this:
line1: text
line2: text2
etc.
But in ASP it looks like this:
line1: text1 text2
What the hell is this now
View Replies
View Related
I have a search page, after search returns value I want to display fields in text box instead of table.
View Replies
View Related
how I can control or limit the display of text so that info from the database is displayed in a more uniform manner. For instance a user requests a group of article titles and is given a list of article names to select from.
The list that displays looks a mess because some titles are very lengthy. Is there a way to control the number of characters that is displayed from a string and end it with "..." so the user understands there is more to the title?
I've seen this done but can not seem to find any info on HOW to go about it. I could place the full title in the mouse over but wish to clean up the initial display of the list.
View Replies
View Related
I have a search page, after search returns value I want to display fields in text box instead of table.
View Replies
View Related
On my index page I have got an area for one product to be displayed randomly from the
database. I have got it workign, but there is one problem i cant get my head around, here is the code so far:
' Initialize ASP RND() function
Randomize()
intRandomNumber = Int (1000*Rnd)+1
strsql = "SELECT TOP 1 art_Artist, art_Title, Rnd(" & -1 * (intRandomNumber) & "*cat_ID)" &_
"FROM eventDisplay " &_
"ORDER BY 3"
The code above isnt working and its when i try and draw out more that one value, as in art_Artist and art_Title.
It works fine if all I want is art_Artist, but as i said when i try to draw out more than one value the randomize function doesnt work.
View Replies
View Related
I am trying to display records ( text and images) from a database. I get the text displayed but the image is displayed as a large series of Asscii text.
Connect.open "DSN=Rentals"
'declare sql statement that will query the database
query = "Select * FROM RentalTable WHERE Location LIKE '%"
query = query & Replace(request("varLocation"), "'", "''") & "%'"
query = query & " AND PropertyType = '" & Replace(request("varPropertyType"), "'", "''")
query = query & "' ORDER BY DateAvailable"
RS.Open query, Connect
do until RS.EOF
%>
<table width="75%" border="1">
<tr>
<td><%=RS("Address")%></td>
<td><%=RS("Location")%></td>
<td <%
Response.ContentType = "image/gif"
Response.BinaryWrite(rs("Image1")) %>
</td>
</tr>
</table>........
View Replies
View Related
On the webpage, I want to display like this:
I use Response.write objRS("FieldName") to display the value of a record .I guess a number of chars is allowed to display a part of record.
View Replies
View Related
I have a VBScript function:
<script language="VBScript" type="text/vbscript">
Function Main()
set wshshell = createobject("wscript.shell")
struser = wshShell.ExpandEnvironmentStrings("%USERNAME%")
strdomain = wshShell.ExpandEnvironmentStrings("%USERDOMAIN%")
msgbox struser & strdomain
End Function
</script>
That works great as a Active X script but I want this to display as a value in a text field and I can't find how o do that.
View Replies
View Related
I'm using Access Database with ASP. There is one particular thing that I
have issue with.
My purpose is for user to update their own profile. Their existing profile
information will be display in Edit Form format. The problem is if the field
has space, the second word will not display, when I display in input text
format.
E.g if My first name "User_FirstName" in my table has entry, let say "David
Johnson" as FirstName, when I execute following code and do a input text, it
will display "David" only. Code:
View Replies
View Related
I want to have a user input a value (1 through 10) in a form. Then click submit. and right under that have text appear depending on what they input. This is what I have, but it doesn't work. I'm not understanding the flow of the script getting called. Code:
View Replies
View Related
I've got a simple template based ASP page which pulls information in one of several different languages from an Access database.
The copy I have in the database is fine. All languages - including the Japanese are displaying correctly when I look at them in Access. However, when I pull the Japanese text from the database, each character renders in the browser as '???????'.
I've tried different HTML encoding, but nothing seems to make a difference.
View Replies
View Related
I am working on a small project which requires XML data to be read from ASP.
I am successful at using XML/DOM objects. But when the data size goes up, sequential access will tax the web server. I would like to retrieve the data in the xml file like a MSAccess DB.
I read somewhere that XML source can be provided as data stream in ADO. If anyone has knowledge on this, please provide me links. If possible, answer to these queries will also be appreciated.
1. Which version of IIS supports this.
2. Which version of ADO
3. Additional components needed at the server ?
I found the following link at MS.
http://support.microsoft.com/default.aspx?scid=KB;en-us;q263247
View Replies
View Related
I am looking for an open source, very simple CMS that allows an administrator to add pages, news articles, and maybe a staff directory.
We don't need new users to signup, or comment, or anything along those lines. Maybe a wysiwyg editor included. Just for a homepage, a news section (that may include many sub-cats, pages).
View Replies
View Related
I've got a Windows 2000 server running with about 50 websites on it, all
running ASP scripts. I've noticed that the servers CPU usage gets up 100%
sometimes, caused by dllhost.exe, which I'm certain is a hanging ASP script
somewhere on the box. Probably an on error resume next line that doesn't go
anywhere when an error is an encountered. Anyways, I'm not sure if there's
a way to isolate the website where its originating, or even the page this
problem is originating from. Is there a way to do this?
View Replies
View Related
i dunno what's the DSN coz it's my friends code and she's using windows2000 so her open database connection code differs from what i use..like
"con.open ...."
what should i do to redirect the the connection to its database?i cant change all the codes coz there's many pages and takes ahellotta time
View Replies
View Related
Does anyone know of any source control software (besides Visual studio) that allows a multi-user environment to be able to check out/in files and keep version control?
View Replies
View Related
I am trying to debug some values in production server.I want to print the value of rRes(10),but I don't want to show it in the screen.I just want to show it in the source code but comment out,so that I can look at the value.Is it possible?
Response.Write("rRes(10) = " & rRes(10)) will show the value in the screen,but i want to hide it in the screen but still see the value in the source code.
View Replies
View Related
there are any open source for ecommerce site like a one such for 'oscommerce' in php/mysql.
View Replies
View Related
i've developed an appliaction that i want to sell it to my client, but dont want him to reseller it, so is there any solfware or techniques that i can used to protect my asp source ?
View Replies
View Related
how do u get somthing from the root directory no matter where abouts you are? say i'm in /folder1/bla/test/foler2 and i wanted to place an image on this page but i don't want to have to backtrack ( ../../../../ ) all the way to get there. is there a peice of code that can go straight to the root directory?
View Replies
View Related
I want to open the source code in an iFrame. What's the ASP script for that?
View Replies
View Related
ADODB.Connection.1 error '80004005'
SQLState: IM002
Native Error Code: 0
[INTERSOLV][ODBC lib] Data source name not found and no default driver specified
------------------
strconn ="DSN=dsnname ; UID=username ; PWD=password"
set conn = Server.Createobject("adodb.connection")
conn.Mode= 3
conn.open strconn
the error is in the last line. THANX
View Replies
View Related