|
I saw a tag parameter that can be used to stop the cacheing of a static web page some time ago. I can't find the reference now . Anyone know it please?
Jeremy Davis
http://www.astad.org
|
|
|
|
|
<%
Response.Expires = 0
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "Cache-Control", "private"
%>
Fernando Finelli
|
|
|
|
|
Thanks, that is what I was thinking of. The problem is is it's for ASPs and in VBScript. I'm being forced to write CGI stuff, and was hoping ther'd be an equivalent parameter for some HTML tag...
Jeremy Davis
http://www.astad.org
|
|
|
|
|
Fernando Finelli
|
|
|
|
|
|
I am a beginner in ASP.
I have installed peer web services on my pc.
wrote a simple script to display current date
Today's date is
<% Response.Write(Date)%>
i am executing the script in browser as http://localhost
It gives me an error called Response object not found.
Do i need to set anything else?
Please help
Thanks in advance
amit
|
|
|
|
|
If you have Windows NT or Windows 2000, goto start/Program Files/Administrative Tools/Internet Service Manager and Run you web server.
Windows 95 or 98, Install the Personal Web Service.
FF
|
|
|
|
|
Thanks for reply
I am using NT.I have installed peer web services from NT workstation CD.Though my web server is running,i am not getting the current date.It just displays the HTML text.Doesnt execute script part.
I am running web server from start\programs\Microsoft peer web services\internet service manager.
Do i need to install ASP ?
I am writing my code in d:\inetpub\wwwroot-->this is the home directory.set permissions as read and execute and d:\inetpub\scripts with execute permission.
Please help
patty
|
|
|
|
|
Oh boy, someone is really taxing my brain late at night I think the asp.dll file is going to be installed when you install IIS.
HTH
Nick Parker
|
|
|
|
|
I am using NT machine.so I cant use IIS.
I downloaded NT option pack 4.0.
I installed PWS. during installation it gave me errors that CreateIISpackage or deleteIISpackage call failed.
server doesnt get started .
please help
thanks a lot
|
|
|
|
|
I write a DLL, in that i create a Word application object for open a Word document. In VB app, it works well. But when i use that DLL in an ASP project. It doesn't work. How can i do that? Use Web service?
I want to write a Web application like Mail Merge in VB. Give me some idea to write it for the Web. Thanks a lot!
|
|
|
|
|
|
ASP only call a function in DLL to return the name of Word document which is created.
|
|
|
|
|
ASP Code:
<%
Set objTest = Server.CreateObject("TestCOM.Test")
objTest.PhysicalPath = Request.ServerVariables("APPL_PHYSICAL_PATH")
objTest.gstrName = "aa.doc"
Call objTest.OpenFile()
%>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
VB Code:
Option Explicit
Private WithEvents mobjWordApp As Word.Application
Private WithEvents wrdDoc As Word.Document
Private m_gstrName As Variant
Private m_PhysicalPath As Variant
Public Property Get PhysicalPath() As Variant
PhysicalPath = m_PhysicalPath
End Property
Public Property Let PhysicalPath(ByVal Value As Variant)
m_PhysicalPath = Value
End Property
Public Property Get gstrName() As Variant
gstrName = m_gstrName
End Property
Public Property Let gstrName(ByVal Value As Variant)
m_gstrName = Value
End Property
Private Sub Class_Initialize()
Set mobjWordApp = CreateObject("Word.Application")
End Sub
Private Sub Class_Terminate()
Set mobjWordApp = Nothing
End Sub
Public Sub OpenFile()
Dim Doc_Path As String
Doc_Path = Me.PhysicalPath & "TempFiles\" & Me.gstrName
Call mobjWordApp.Documents.Open(Doc_Path, False, False)
Set wrdDoc = mobjWordApp.ActiveDocument
Doc_Path = Me.PhysicalPath & "TempFiles\TestResult.doc"
Call wrdDoc.SaveAs(Doc_Path)
wrdDoc.Close
Set wrdDoc = Nothing
mobjWordApp.Quit
End Sub
+++++++++++++++++++++
Thanks any way!
|
|
|
|
|
We have the following test class
Public Class MyTextBox : Inherits TextBox
End Class
It's empty on purpose. Now, the class is used as follows in a web page:
Public Class WebForm1 : Inherits System.Web.UI.Page
Private mTextBox As TextBox
Private mButton As Button
Public ReadOnly Property Form() As HtmlForm
Get
Return CType(Me.FindControl("Form1"), HtmlForm)
End Get
End Property
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.EnableViewState = True
mTextBox = New TextBox()
Me.Form.Controls.Add(mTextBox)
mButton = New Button()
Me.Form.Controls.Add(mButton)
AddHandler mButton.Click, AddressOf Me.ButtonClick
If Not Me.IsPostBack Then
mTextBox.Text = "ABCDEF"
mButton.Text = "PressMe"
End If
Debug.WriteLine("PostBack=" & Me.IsPostBack)
Debug.WriteLine("Text=" & mTextBox.Text)
Debug.WriteLine("Button=" & mButton.Text)
End Sub
Private Sub ButtonClick(ByVal Sender As Object, ByVal E As EventArgs)
Debug.WriteLine("ButtonClick")
Debug.Indent()
Debug.WriteLine("Text=" & mTextBox.Text)
Debug.WriteLine("Button=" & mButton.Text)
Debug.Unindent()
Debug.WriteLine("ButtonClick")
End Sub
End Class
The output after loading the page, and clicking the button looks as follows:
PostBack=False
Text=ABCDEF
Button=PressMe
PostBack=True
Text=
Button=PressMe
ButtonClick
Text=ABCDEF
Button=PressMe
ButtonClick
Now, if I change the mTextBox variable to be a MyTextBox, and say mTextBox = New MyTextBox, I get the following:
PostBack=False
Text=ABCDEF
Button=PressMe
PostBack=True
Text=ABCDEF
Button=PressMe
ButtonClick
Text=ABCDEF
Button=PressMe
ButtonClick
The difference is that on the first trial (when mTextBox is a TextBox), Text is Nothing before the button click, but correct afterward. When mTextBox is a MyTextBox, Text is already set. Huh? Isn't anything declared as a MyTextBox simply a TextBox, since there's no additional implementation?
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
I want to add a string from an TextBox into a file on the server. Is that possible!?
And I'm talking about ASP.NET now
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Sure it is, as long as you have permissions to the file. Look at System.IO.File or System.IO.TextWriter.
|
|
|
|
|
Do you think I have to have my own server or so?
Or can I upload my homepage on Xoom or just somwhere it's free to upload a homepage!?
Thank you...
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
You ould have to check with your host if they would allow you write to files on the server. I wouldn't see why not, as long as it was in your space and your trying to write to system files.
Do they support ASP.NET?
|
|
|
|
|
I was trying to port some asp code to ASP.NET and can't seem get the imagemaps to work. the asp:image tag doesn't seem to have anything for it. Does anyone know of a way to accomplish the same thing?
|
|
|
|
|
Well, I dunno about .NET, but image maps are not belong to ASP, it is plain HTML, e.g. client side
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
When I tried using a normal img tag with the imagemap on an aspx page it didn't work and the asp:image tag doesn't have that attribute availalbe. Unless I'm missing something.
|
|
|
|
|
Hi.
Im trying to learn ASP and im having problems with connecting to access databases. Ive tried to open a connection and can perform a select statement and all is well. However, when I try to update I get an error must be an updateable query. Ive tried insert and update, neither works. So I tried to open a recordset and use the .AddNew method and I get an error saying:
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
db.open "select * from user", connstr, adOpenDynamic,adLockOptimistic
(please ignore the case)
where connstr is "DSN=Test;DBQ=C:\Inetpub\wwwroot\Project2\db2.mdb;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;"
Ive also tried not doing a select just opening user?
Im stumped can anyone help?
|
|
|
|
|
simonjackson@att.net wrote:
adOpenDynamic,adLockOptimistic
Do you have the ADOVBS.inc file included on that page, you will need that file to use those variable name associations.
If you don't have that file, you can replace set your variable adOpenDynamic = 2 and adLockOptimistic = 3
HTH
Nick Parker
|
|
|
|
|
Add
<!-- METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" -->
at the beginning of the ASP file. Thus you will be able to use constants of ADO. This is better way than to have include to adovb.inc
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|