|
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!
|
|
|
|
|
Hi,
I need to get the IP Address of the visitor.... how can I do this using ASP?
Thanks for ur time .....
~Statbat( );
|
|
|
|
|
You want to use the Request.ServerVariables collection.
Take a look at this article for in depth information.
Jason Jystad Cito Technologies Sonork ID: Ogami(100.9918)
There ain't nothin' in this world that's worth being a snot over. --Larry Wall
|
|
|
|
|
Request.ServerVariables("REMOTE_ADDR")
See: http://www.codeproject.com/useritems/Request_server_variables.asp
FF
|
|
|
|
|
OK, this is driving me absolutely nuts, because I can find exactly NO help on it on the net. I'm trying to load in a User Control using the LoadControl method, the error that I get every time is as follows:
System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %> )
I've got the following tag at the top of my aspx file:
<%@ Reference Control="ClientInfo.ascx" %>
And my code looks as follows:
'The .vb codebehind file:
Dim C As ClientInfo1 = CType(LoadControl("ClientInfo.ascx"), ClientInfo1)
Page.Controls.Add(C)
Any ideas? Has anybody else seen this type of error before?
Thanks in advance.
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
Hey,
I'm messing around with regular expressions in order to get something that will automatically convert URL's into live hyperlinks in the forums. I have the following expression:
(http|ftp|https):\/\/[\w]+(.[\w]+)([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])? which does a good job of getting URLs, but I need something that will not return a match if the URL is already enclosed in <a href=...> tags.
Any thoughts?
Those looking to play with this a little can use my online regular expression test page.
cheers,
Chris Maunder
|
|
|
|
|
Easy peasy - just put a space before it:
" (http|ftp|https):\/\/[\w]+(.[\w]+)([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?"
'cause if it's already <a href='d then you have the equals instead of the space.
HTH.
[edit]
Obviously you can extend it to check for any letter other than an '=' followed by any number of spaces, followed by the URL like you've already got(ten). I can't remember the exact syntax off hand and don't have docs handy; I hate doing regular expressions .
[/edit]
--
Andrew.
|
|
|
|
|
So what if the URL is at the beginning of a line? Or what if the URL is of the form <a href=...> www.abc.com</a>?
cheers,
Chris Maunder
|
|
|
|
|
brain not in gear... I had another bash but couldn't get it working right, so I finally decided to pass the buck.
--
Andrew.
|
|
|
|