|
Que1. There is a website that display results when you enter a roll number. My client wants me to make an application customised to his requirements but fetching data from that website. The trouble is I do not know the DSN of the database the result site is using nor do I have any access to the site. The only way I can think is of sending a get or post query from my page but then I cannot have any control over the recordset . Can you suggest any way of doing this in ASP or in any other language.
Que2. I cannot use global.asa on my local machine. Do you have to make any settings changes before the IIS finds the global.asa file. It is there in the root of my application but I cannot access the variables in it.
Will be thankful for your replies.
regards,
Deepak Appu
|
|
|
|
|
Deepak Appu wrote:
There is a website that display results when you enter a roll number
Does this site not expose an XML format or better yet, a webservice?
If not, then using GET/POST and searching through the resultant HTML is the alternative.
Deepak Appu wrote:
I cannot use global.asa on my local machine
You could also try include files on the server side.
Cheers,
Simon
"I ask candidates to create an object model of a chicken.", Bruce Eckel on interviewing programmers.
animation mechanics in SVG (latest pic 1) (latest pic 2)
|
|
|
|
|
I'm trying to read from a text file, and I used the code provided on this website. Where I'm having the problem is that when I test the page it seems to stay in limbo, and locks up my IIS server. I think my problem is in my naming of the file to be read. The file is stored in C:\Inetpub\wwwroot\testread.txt. When I go to enter in the "Const Filename = "What should be here???", and do I need to create an ODBC connection like when I connect a database. Your help would be greatly appreciated.
M.T.
|
|
|
|
|
Please can you post a code snipett.
Are you using the FileSystemObject?
mdesign wrote:
do I need to create an ODBC connection like when I connect a database
No you don't.
Cheers,
Simon
"I ask candidates to create an object model of a chicken.", Bruce Eckel on interviewing programmers.
animation mechanics in SVG (latest pic 1) (latest pic 2)
|
|
|
|
|
I actually got it to work but thanks for input. Here is the working code incase anyone else needs help.
<%
Const Filename = "testread.txt"
Const ForReading = 1, TriStateUseDefault = -2
Dim FSO, FilePath
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
FilePath = Server.MapPath(Filename)
if FSO.FileExists(FilePath) Then
Set TextStream = FSO.OpenTextFile(FilePath, ForReading, False, TriStateUseDefault)
Dim Contents, Title
Title = TextStream.ReadLine
Response.Write "
" & Title & " "
Contents = TextStream.ReadAll
Response.Write "
" & Contents & " "
TextStream.Close
Set TextStream = nothing
Else
Response.Write" File" & Filename & " does not exist"
End if
Set FSO = nothing
%>
|
|
|
|
|
is php the linux equal of asp, or how should it be understood? why isn't there a section for php on CP?
|
|
|
|
|
Cois wrote:
is php the linux equal of asp
Whilst I think php is a lesser language than ASP, it does the same job - just with a crappier syntax (IMO)
Cois wrote:
why isn't there a section for php on CP
Because nobody has written any articles or asked any questions
There are a few PHP examples about here, I think somebody converted the CP forums to PHP.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
Cois wrote:
is php the linux equal of asp
This is a good analogy, although there are versions for Windows, too.
Cois wrote:
why isn't there a section for php on CP?
Where is the Linux section?
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
PHP is the poor mans ASP... (Just poking fun)
You are right in a way. PHP is to ASP as Linux is to Windows. The fact that PHP is generally served from Linux and ASP generally served from Windows strengthens that notion.
There is no section for PHP on CP because officially or not CP is a Microsoft/Windows site. 90% of the developers here are Microsoft boys and girls who use MS technologies.
Also nobody wants to dilute CP too much. If we let in PHP then we will have to let in Perl, ColdFusion, CGI etc. etc. Soon it will be a mess and the community will loose the cohesion it has.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Hi, tx for the replies.
The reason I'm asking is that my company has a webpage that is hosted on a Linux (Unix) machine, so I'm not sure if I would be able to use *.asp to connect with a database.
So: Can u use asp on a Linux server, and do I have to us MySQL?
|
|
|
|
|
Cois wrote:
So: Can u use asp on a Linux server, and do I have to us MySQL?
You can serve ASP off a Linux box by using something called ChiliSoft which I see has now been renamed and is by Sun. Never used it, but apparently it works.
As for not having to use MySQL... MS SQL Server 2000 does not run on Linux. You could connect to it runnin on a Windows box, but I doubt that is what you want. Oracle probably runs on Linux. Otherwise MySQL is your best bet, it is not that bad (but you get spoilt using MS SQL.)
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Can we use PHP & MSSQL Server to develop web sites? (MS SQL Server runs on a Window machine and Web server for PHP runs on a Linux machine).
|
|
|
|
|
Absolutely, you should have no problems with a PHP web app on a Linux box talking to a MSSQL database on a Windows box.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Paul Watson wrote:
You can serve ASP off a Linux box by using something called ChiliSoft which I see has now been renamed and is by Sun. Never used it, but apparently it works.
I used ChiliSoft about a year ago and it work great. But if you're under linux a sugest using apache+php. It's a very good combination.
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
Oh for sure, much better to use the language and environment made and optimised for a particular OS.
ChilliSoft must do some odd wrapper things to get ASP working on Linux. Same goes for using PHP on Windows. It can be done, but it would not be as good as using ASP on Windows.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
Hi,
We have the following problem. On the server, we have a large string.
This string, should be downloaded by the user, as a seperate file. For performance reasons, we can't create a file on the server, containing the string, that the user could download. The string has to be sent to the client and from there be saved as a file. Can anyone give a hint on an elegant solution to this problem?
Cheers,
henrik
Henrik Sternberg,
Cambridge Technolgy Partners, Germany
www.ctp.com/ce
henrik.sternberg@ctp.com
|
|
|
|
|
Henrik Sternberg wrote:
Can anyone give a hint on an elegant solution to this problem?
Yes:
Create an ASP page with this code:
Response.Expires = -1
Response.ContentType = "aplication/plain"
Response.AddHeader "content-disposition", "attachment; filename=yourfile.txt"
Response.Write yourlongstring
And IE will start the download process with yourfile.txt as the default filename.
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
Is there a way of creating Activex controls (similar to the windows user control in VB 6.0) in VB.Net. I want to use such a control in Web forms or HTML page.
Currently I am able to use an Activex control (windows user control) created with VB 6.0 in ASP.Net web form. Similarly I created a Windows user control in VB.Net and when I added the control in ASP.Net application's tool box using 'customize tool box' option the control shows up, but is greyed out.
|
|
|
|
|
hi there.
i m trying to create an Excell-like spreadsheet.
i used the "dynamic propertis" which work so slow , but the make my
life easier.
my prob is , how can i edit the cells at runtime?
at first , i place 500 textBoxes (each cell) , but the page
becomes extreamly heavy.
then , i handled the onclick of the table , and if the srcElement id TD , i place a previously created (absolute positioned) TextBox over that cell and display it.
the problem is in getting the CElls Cords. if i could use TextArea it was perfect cause it gives me absolute screen positions. but its a TD so i cant.
i used TD.getBoundingClienRect. it worked at first. but when i set the page&table to "Direction:RTL" , it was mis-accurate (like it didn't take something in account. maybe the scrollbar that moved to the other edge of the screen , but i don't like the idea of handling it manualy.).
also , if the page was scrolled down , the GetBoundingClientRect also mis-accurate (gives me a much higher top position (even if the item is in the page's view area ... ).
and if i use the mousewheel while editing , the table moves offcourse , but the textBox isn't...ouch... (this i solved by handling the MouseWheel and a custom flag indicating we are in the middle of editing (so event.returnValue=false).
any suggestions... please... its URGENT...
thanks .
david.
|
|
|
|
|
hi ,
eventualy , i create the TextBox dynamicly (resetting the InnerHTML
attribute). i m not sure it works faster cause IEx have to recreate and destroy a textBox on each edit. but it solves the repositioning and the scrolling&rtl problems.
now i have 2 things that didn't solved. i have to retain the value of the cell while editing cause the other cells uses the cells InnerText in their expression. removing the InnerText when overriding the InnerHTML attribute with an "INPUT" , will cause the other cells to be deleted untill the user finishes typing and the innerText is resetted. any solutions? (i try setting an &nbs; insinde the innerText while editing , but this made the cell multiline cause my textbox has a height&width 100% (have to...).
second , that Dynamic properties works so slow... and the CPU is 100%. any suggestions as of how to make it faster? i don't have time write my own "cell_on_value_change" routine...
thanks...
|
|
|
|
|
HTC ViewLink Content does not allow (successful) cut/copy/paste operations when it is viewed via an IFRAME. The context menu is displayed but does not perform successful operations. This does not occur when the same file is viewed in its own window.
Is this a bug or am I missing some information..
Given an IFRAME in an HTML file:
<HTML><HEAD></HEAD><BODY>
<IFRAME src=page1.html></IFRAME>
</BODY></HTML>
And this HTML file (page1.html):
<HTML xmlns:myNameSpace>
<?IMPORT namespace="myNameSpace" implementation="IMP.htc" >
<HEAD>
</HEAD>
<BODY>
<myNameSpace:myTag />
</BODY>
</HTML>
And this HTC ViewLink Behavior Implementation file (Imp.htc):
<PUBLIC:COMPONENT tagName="myTag">
<PUBLIC:DEFAULTS viewLinkContent/>
</PUBLIC:COMPONENT>
<BODY>
Cannot cut/copy this text when parent document is in an IFRAME"
<INPUT VALUE="Cannot cut/copy this text when parent document is in an IFRAME">
</BODY>
Cut/Copy/Paste operations are not successful on the HTC ViewLink Behavior Implementation Content file if the content is being viewed thru an IFRAME or FRAME
ie IFRAME-->HTML File containing Master Element-->HTC ViewLink Content.
Cut/Copy/Paste operations are successful however if the content is not viewed thru an IFRAME or FRAME
ie HTML File containing Master Element-->HTC ViewLink Content.
What do you think?
|
|
|
|
|
hi
i want to make a chat application in ASP. i want someone to give me a guideline on how to make it.
Please someone should help me over it
Bye.
|
|
|
|
|
Well there are several ways to do it. But it all boils down to what you have available and how many people will be using it. I did some work for a company that needed something quick to allow them to chat in realtime with customers. They were expecting about 10 concurrent users so I used a combination of cookies and application vars. Application vars carried the actual chat and authenticated via the cookie.
Basically had people log in and they could see only the conversation to which they were invited. Not a very scalible solution but worked perfectly for them.
Fear not my insanity, fear the mind it protects.
|
|
|
|
|
can u please give me some more details like, how do many customers can talk to one guy. like how to chat to each individual in a separate window.
|
|
|
|
|
We have a pay service that provides us information, via web, on a daily basis. I am trying to build an application to automate the logon and file download that a user has to do today. I have started with the webbrowser control to hit the site and login and then use the WebClient.DownloadFile() to get the .PDF files. There web server sees this attempt as two different sessions from different computers. So I added some headers to the webclient to make it look more like the WebBrowser control request:
Me.WebClient1.Headers.Add("User-Agent", "Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SALT+1.0.3404.1+1007+Developer;+.NET+CLR+1.0.3705)")
Me.WebClient1.Headers.Add("Cookie", Me.AxWebBrowser1.Document.cookie())
Me.WebClient1.Headers.Add("Referer", Me.AxWebBrowser1.Document.url)
My last option would be to use Me.AxWebBrowser1.Document.Links(intPDFFileIndex).Click() and a SendKeys combination to do it all from the Web Browser control.
I have not seen much help anywhere for automating downloading of content in .NET. I can't be the only one wanting to do this? Right?
Is there a better approach?
|
|
|
|