How to split the contents of a page???
Hi,
Hi,
>
> I have a problem in the display of the ASP screen actually i am
> retrieving and displaying the data from a database when the view
button
> is hit.The contents for display is so long so i want to have a
previous,
> next link on that page so that some 100 records are displayed in each
> page.Pls help me.
> I am attaching my code here please help me where can i make the change
> to split the display of my page.
>
> This is for entering the couriers that is received in an company. Here
> fd=from date
fm=from month
td=to date
tm=to month
fy=from year
ty=to year
rpt=report
and this program displays the details of the courier
> received on the basis of the input
fdate-from date and
tdate-todate will be displayed.
> Please help me
>
> <%@ LANGUAGE="VBSCRIPT" %>
> <SCRIPT language="javascript">
> function CClr(oCmp, Num)
> {
> if(Num == 1)
> oCmp.style.backgroundColor = "#FFFFBF"
> else
> oCmp.style.backgroundColor = "#FFFFFF"
> }
>
> </SCRIPT>
> <html>
> <title>courier</title>
> <body>
>
> <%
> dim fd,fm,fy
> dim td,tm,ty
> dim rpt,stxt
> dim fdate, tdate
> dim branch
> dim toatalrec
>
>
> fd=Request.QueryString("fd")
> fm=Request.QueryString("fm")
> fy=Request.QueryString("fy")
> branch=Request.QueryString("branch")
> fdate=fm+"/"+fd+"/"+fy
>
> td=Request.QueryString("td")
> tm=Request.QueryString("tm")
> ty=Request.QueryString("ty")
> tdate=tm+"/"+td+"/"+ty
>
> stxt =Request.QueryString("stxt")
> number=Request.QueryString("number")
>
> rpt="N"
> dim cn, rs
> set cn = Server.Createobject("ADODB.Connection")
> set rs = Server.Createobject("ADODB.Recordset")
>
> //cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security
> Info=False;Initial Catalog=mmpl;Data Source=mailserver", "it","it"
>
> cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
> Security Info=False;Initial Catalog=mmpl;Data Source=aarServer",
> "it","it"
>
> if stxt=VbnullString then
> if branch="ALL" then
> rs.Open "select * from mmpl_in_trans where rpt_date>='" & fdate & "'
> and rpt_date<='" & tdate &"'", cn
>
> else
>
> rs.Open "select * from mmpl_in_trans where rpt_date>='" & fdate & "'
> and rpt_date<='" & tdate &"' and in_fn='" & branch &"'", cn
>
> end if
>
> response.write("<font Face='Arial Unicode MS'><B>INWARD ENTRY <a
> href='eml_in.asp'>back</a> <a href='..\mmplinout.asp'>Home
> page</a></br>")
> Response.Write ("<Font Face='Arial Unicode MS'><B>From : " & fdate & "
> to : " & tdate &" </br>")
>
> rpt="Y"
>
> else
>
> rs.Open "select * from mmpl_in_trans where in_details like '%" & stxt
&
> "%' order by in_fn", cn
>
> response.write("<font Face='Arial Unicode MS'><B>INWARD entry</b> <a
> href='eml_in.asp'>back</a> <a href='..\mmplinout.asp'>Home
> page</a></br>")
>
> Response.Write ("<Font Face='Arial Unicode MS'><B>Searched for : " &
> stxt &"</br>")
>
> rpt="Y"
>
> end if
>
> if rpt="Y" then
> response.write("<table border=0 > ")
>
> response.write("<tr colspan=0 onblur='CClr(this, 2)'
> onfocus='CClr(this, 1)'><th bgcolor=orange><Font Face='Arial Unicode
MS'
> size=2>DOCDT </Font></th>")
>
> response.write("<th height=5 bgcolor=orange><Font Face='Arial Unicode
> MS' size=2> BRANCH </Font></th>")
>
> response.write("<th bgcolor=orange><Font Face='Arial Unicode MS'
> size=2>DEPT </Font></th>")
>
> response.write("<th bgcolor=orange><Font Face='Arial Unicode MS'
> size=2>DETAILS </Font></th>")
>
> response.write("<th bgcolor=orange><Font Face='Arial Unicode MS'
> size=2>COU NO </Font></th>")
>
> response.write("<th bgcolor=orange><Font Face='Arial Unicode MS'
> size=2>COU DATE </Font></th>")
>
> response.write("<th bgcolor=orange nowrap ><Font Face='Arial Unicode
> MS' size=2> REC TIME </Font></th>")
>
> response.write("</tr><tr>")
>
> if Rs.EOF=False then
> Rs.MoveFirst()
>
> With Rs
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >" & .Fields("IN_DATE") &"</Font></td>")
>
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >"+.Fields("IN_FN")+"</Font></td>")
>
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >"+.Fields("IN_DP")+"</Font></td>")
>
> response.write("<td bgcolor='#A4D867'><Font face='Arial Unicode MS'
> size=2 >"+.Fields("IN_DETAILS")+"</Font></td>")
>
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >"+.Fields("IN_CRNO")+"</Font></td>")
>
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >"&.Fields("IN_CRDATE")&"</Font></td>")
>
> response.write("<td align=Center bgcolor='#A4D867'><Font face='Arial
> Unicode MS' size=2 >"+.Fields("ENT_TIME")+"</Font></td>")
>
> response.write("<tr>")
> Rs.MoveNext()
>
> End with
> next
> End if
>
>
> End if
>
> %>
> </table>
> <input type="Submit" name="submitted" value="Next">
> </Font></pre></font><form>
> </BODY>
> </HEAD>
> </HTML>
>
> Thanks,
>
> Aarthy
>
*** Sent via Developersdex http://www.developersdex.com *** Tag: How can I avoid the windows authentication for viewing a report Tag: 315994
serving XML
A site I regularly work on has, in its web root, a static XML file. This
XML happens to be an ADO persisted recordset with 0 rows, all of ~3 KB in
size. (Clients can open it, insert records, and then push the appended
recordset back to the server for an UpdateBatch, but that's not important to
this question.)
Everything works, however, during an analysis of the site's IIS logs, I
noticed that requests for this static XML have, on occasion, taken as long
26 seconds to be processed! The thing that's mind-numbing is that we have
an ASP script that gets requested 2-3 times more often, that, when called
with a certain parameter (that causes it to return last error details stored
in the session) has never taken more than a sub-second to process, no matter
how busy the server is!
This has led me to wonder if this XML is truly as static as I'd assume, so
my question is, does an xmlns attribute cause an implicit request, thus
imposing a dependency on a foreign site? Specifically, does
"xmlns:rs='urn:schemas-microsoft-com:rowset'" cause an http request to
schemas.microsoft.com?
Given that requests for ASP scripts are completing concurrently while a
request for this static file is being "processed", what could cause this
tiny little download to lag so badly?
I'm considering changing the file to an ASP, that sets content type and then
response.writes the XML from a string buffer, but I can't imagine how that
could be more efficient. (The server O/S is 2K3/IIS6.)
tia,
Mark Tag: How can I avoid the windows authentication for viewing a report Tag: 315983
msxml2.serverXMLhttp and response.binarywrite
Question:
I get the eror listed at the bottom of the post. What can I do to
make the response of the x1.send a "binary" type? Or, in general,
how can I just "make this work"?
<%@ Language=VBScript %>
<%
Response.Buffer = TRUE
Response.ContentType = "image/jpg"
Set x1 = Server.CreateObject("Msxml2.ServerXMLHTTP")
x1.open "GET", "[http link to your favorite image.jpg]", FALSE
x1.send
Response.BinaryWrite x1.responsestream
set x1 = nothing
%>
Error is returned below:
'Response object error 'ASP 0106 : 80020005'
'Type Mismatch
'/scraps/getGraphic.asp, line 10
'An unhandled data type was encountered. Tag: How can I avoid the windows authentication for viewing a report Tag: 315981
ASP/SQL Connundrum (kinda long)
Hey guys,
I currently have a giant client editor form in ASP/SQL. The form is
fine. The problem is that there are several sub-forms that store their
data in other tables. Which gets cluttered. For example, I can't let
users add data in these sub-forms until the main form is completed and
an autonumbered ID is generated.
We're taking a few months out of new developments to go back and fix a
bunch of things (like this), and I was wondering what the best way
would be (if anyone has run in to a similar issue) to allow a large
editor that touches multiple tables to have one giant master "Save"
button that validates everything and that doesn't make changes until
it's clicked.
Sadly, transactions are unable to span across multiple pages (and I
don't wanna store recordsets as session objects), and they wouldn't
work anyways, since in the event of new additions, I would need to wait
until I have that autonumbered ID generated before I attempted to store
anything in one of the smaller tables.
I was thinking of perhaps session variables that corresponded with the
names of the tables that I was working with that had an array of data
that corresponded with {fieldName} => "Value," and then loop through it
and validate it, then execute the appropriate SQL.
Cliffs: In ASP/SQL, does anyone know of some industry-standard way to
have one "Save" button store data collected through multiple pages,
assuming that in some cases, when adding a new record, we'd need to get
the value of the autogenerated "ID" field first before saving data that
affects other tables?
Wow... what an obnoxiously long question. If you're bored, feel free to
read through :) Tag: How can I avoid the windows authentication for viewing a report Tag: 315979
Time Function returns Wrong Time
I am writing an ASP program that includes a Form.
When the Form is submitted I use the Date() and Time() functions to put the
date and time into the Body part of the e-mail.
The time reported is three hours earlier than the time at which the Form is
actually submitted.
I understand these functions are evaluated on the server so the server must
be in a time zone three hours earlier than where I am .
Is there any way I can get the local time at the location where the user is
actually located. ??
Thanks Tag: How can I avoid the windows authentication for viewing a report Tag: 315977
Can perform task from a .vbs file but not from an .asp file! Why?
Hi
I had asekd previously a question qith regards to running a DLL file from
ASP. It was not running for me. Bo error returned, nothing, Just an empty
string (when it should have not been empty). I created a .vbs file and put
it in the same directory as the .asp file on the web. The same exact code.
It runs fine. Soon as I call the asp file, it still does nothing. Would
anyone have an idea as to why the .asp has no ability to run this dll?
The dll in question will create a folder within the same directory as the
calling file. I thought it could be a permissions thing, but after creating
a new dll file to test creating folders, it had no problem doing so
I am stuck as I am not sure what else I could do to make this run from asp
Thanks
Leo Tag: How can I avoid the windows authentication for viewing a report Tag: 315970
response.redirect within frame set
I've inherited a web application that uses frames :-(
I have an ASP page (within the frame set) that I want to refresh the WHOLE
frame set
Response.redirect just launches the frame set again but within the current
frame, not as a top level item, so I end up with a frame set within a
frameset.
This must be simple to achieve, but a bit stumped by it.
Thanks Tag: How can I avoid the windows authentication for viewing a report Tag: 315967
DetailsView & FormView controls using drop down lists
Hi,
FormView & DetailsView are great controls in the new version of ASP.Net, but
I am finding it tricky to display more than the record that either control is
bound to at the time. For these controls to be useful in any mode other than
read-only, we need the ability to populate controls like drop downs that hold
associated data, which in the DB represents foreign key related data. In
order to do this, do I create a template field that has a seperate control
that binds to a different data source pulling back the "lookup" data?
Thanks for any help in advance
Paul Tag: How can I avoid the windows authentication for viewing a report Tag: 315948
Pages times out regardless of settings
Hi all,
I've written a page that uses a emailer component and it keeps timing out.
It takes 2-3 seconds to send each mail, gets part way through the list of
recipients and dies.
I have tried changing the Script Timeout setting in IIS to some huge number
(2147483647?).
I have tried setting Server.ScriptTimeout = 0 and Server.ScriptTimeout =
2147483647.
None of these make any difference. What can I do now?
--
Sean. Tag: How can I avoid the windows authentication for viewing a report Tag: 315947
how to redirect 404 error to custom error page?
I want to know how to redirect 404 error to custom error page? For
example, if test.html doesn't exist and the user type
http://www.myserver.com/test.html, it will show my custom error page,
instead of the default "The page cannot be found" error page generated
by the web browser.
Please advise. thanks!! Tag: How can I avoid the windows authentication for viewing a report Tag: 315941
Start/End Dates for a Week
If I know the week number and the year, how can I calc the beginning and
ending dates of the week?
For background I'm going to do some grouping by week but don't just want
to call the weeks Week 25, Week 26, Week 27, etc.
Thanks in advance,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
*** Sent via Developersdex http://www.developersdex.com *** Tag: How can I avoid the windows authentication for viewing a report Tag: 315940
Password Encryptor/Decryptor for ASP 3.0?
Hi!
Im planning to encrypt the password that was stored on msaccess database and
also the text inputed from a password textbox. Also, if I want to get the
password from the database, I need to decrypt it so it can be comparable to
the one that is inputed on the textbox. Is there a way on how to handle
this?
MP Tag: How can I avoid the windows authentication for viewing a report Tag: 315939
Triggering automated Emails
Dear All,
I need to send a set of Emails from my application (reminders) each month
1st. Is there anyway in ASP scripts to trigger an event to run
automatically? I have no dedicated server, so no DLLs or Scheduler scripts
can be used. Also adding the trigger script in the application object may
not send emails in time, as we have not enough visitors to that application.
Is there any way other than 'Clicking a Send button'?
Any support will be appritiated.
Warm Regards,
Benny Tag: How can I avoid the windows authentication for viewing a report Tag: 315935
text file
Hello,
I am using asp classical and connection to SQL 2000 on a Windows 2000
machine.
I am using this code to generate a text file when the user clicks on the
link. This is so the user can download the file on an as needed basis.
DIM filename
filename = "Companies.txt"
Response.ContentType = "Unknown"
Response.AddHeader "content-disposition", "attachment;filename=""" &
filename & """"
The issue I am having is if the text file is less than approx. 1 mb then the
file downloads fine. If the file is bigger than that I get this error:
"Internet Explorer cannot download <the name of the asp page> from <the name
of the website> Internet Explorer was not able to open this internet site.
The requested site is either unavailable or cannot be found. Please try
again later."
I get my data here:
DIM rs, strSQL
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseClient
strSql = "stored procedure" & param1 & "," & param2
rs.Open strSql ,objConn ,adOpenForwardOnly ,adLockReadOnly ,adCmdtext
I then write it to a text file like this:
<%
Response.Write "CompanyName" & "|"
if not rs.BOF and not rs.EOF then
rs.MoveFirst
Do until rs.EOF
Response.Write rs.fields("Company_Name")& "|"
rs.MoveNext
Loop
end if
rs.Close
Set rs= nothing
%>
There are many more fields that are being returned but to keep it short I
only included one so you could see the layout of my code.
If someone could help me I would appreciate it.
If you need more information please let me know.
Thanks Gary Tag: How can I avoid the windows authentication for viewing a report Tag: 315927
javascript calling asp function
How can I call asp function from javascript? Tag: How can I avoid the windows authentication for viewing a report Tag: 315926
making a session-less app
hi
if i disable session state...
how can i identify the user session ???
and, assuming that i generate my own "session id" for each login
carrying it along the requests...
how can i, latter, release the session ?
remember that Session_OnEnd( ) don't work well all the time ...
thanks
--
atte, Hernán Tag: How can I avoid the windows authentication for viewing a report Tag: 315925
Rotating pictures
Hi,
I am looking for code which can rotate pictures without refreshing the
page. I want to read randomly selected 5 images from
database and then keep on rotating them every 5 seconds.
Any help is appreciated. Tag: How can I avoid the windows authentication for viewing a report Tag: 315915
Finding the maximum value in a recordset column
How do I find the maximum value of a recordset column? I'd rather do it
this way than open a new recordset with Max(column).
Thanks in anticipation.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com Tag: How can I avoid the windows authentication for viewing a report Tag: 315914
Unable to read files in directory
IIS cannot read files in a directory reporting that :
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'Fso.GetFolder'
This has to do with Scripting.FileSystemObject.
I make sure the scrrun.dll is properly registered with regsvr32.
Still the problem persists.
Previously I do not know what I did right once in permission setting and
managed to display the said files but it went away after tweaking the
permission for make other functions available.
I scoured the web and this problem is a perrenial one. Many many suggestions
have been made even in expertsexchange site but no real solution. I don't
understand why it is so difficult to have this file system service up and
running.
Can some experts who have the answer please help?
------------------------------------------------------------ Tag: How can I avoid the windows authentication for viewing a report Tag: 315909
Which CDO.Message Charset Should I Use?
Hi,
I am relatively new to using CDO.Message, and I desperately need some
help!
I have an ASP 3.0 application that uses CDO to send automatic alerts
through Exchange 2003. How do I determine which charset to use for the
objMessage.BodyPart.CharSet?
The users of this application typically enter the HTMLBody message
through a form's textarea box. Often, they might cut and paste this
data from a MS Word file, which plays havoc on the message whenever
special characters are encountered, such as smart quotes, em dashes,
vulgar fractions and degree symbols.
Initially I tried the Replace function to exchange these characters for
their html counterparts; however, this appears not to affect the
CDO.message.
I have also tried the following with no success:
objMessage.BodyPart.CharSet = "us-ascii"
objMessage.BodyPart.CharSet = "utf-8"
objMessage.BodyPart.CharSet = "windows-1252"
Should I think about changing the charset in my General.asp page from
<META http-equiv=Content-Type content="text/html; charset=unicode"> to
something else?
I could really use some direction here to get this figured out. Thanks
in advance for any assistance you can offer!
Chris Tag: How can I avoid the windows authentication for viewing a report Tag: 315908
FileSystemObject security
Hi expert,
By using FileSystemObject, I want a specific user from the server to write
and delete folders, and not allow the IUSER_<server> to do that. Is it
possible? If yes, how I can do that? thanks
Andrew Tag: How can I avoid the windows authentication for viewing a report Tag: 315907
Formatting a HtmlBody email string to include variables
I have this:
1 emailBody = "<html>" & vbCrLf _
2 & "<head>" & vbCrLf _
3 & "<title>Interpreter Request details</title> " &
vbCrLf _
4 & "</head> " & vbCrLf _
5 & "<body> " & vbCrLf _
6 & "<font face=Verdana><b>Interpreter Request
details: " & vbCrLf _
7 & "Requestor: </b><u> <% strFName strLName %></u>"
& vbCrLf _
...
& "</body> " & vbCrLf _
& "</html> " & vbCrLf
In line 7, I need to display the results of the variables strFName and
strLName (and have a space in between the two) but I don't know the proper
formatting. If I just use the & then I get the literal strFname instead of
the value. Could someone please show me the correct syntax for this?
TIA! Tag: How can I avoid the windows authentication for viewing a report Tag: 315904
ASP and Excel
I can connect to an Excel worksheet and get records with no problem, if
I know the worksheet's name. However, when my users upload their excel
files, I don't know what the active sheet they want to work from is
called.
I have two options - either force them all to give the saem name to
every worksheet they upload, or providing them with an input field
where they can provide the name of the relevant worksheet
Rather than force my users to name all their worksheets "sheet1", is
there a way I can use ASP to find out the names of the worksheets in a
workbook?
TIA Tag: How can I avoid the windows authentication for viewing a report Tag: 315902
SoftArtisans SMTPMail and XP
Has anyone tried using SMTPMail on a Windows XP Pro machine? The sys.
reqs. on their site only says W2K (and prior).
I've successfully registered SASMTP.dll, and simply trying to
instantiate it in Classic ASP with:
Dim objMailer
Set objMailer = CreateObject("SoftArtisans.SMTPMail")
results in an error:
Microsoft VBScript runtime (0x800A01AD)
ActiveX component can't create object: 'SoftArtisans.SMTPMail'
/test.asp, line 12
Any clues? Thanks. Tag: How can I avoid the windows authentication for viewing a report Tag: 315899
Test database connection failed via hostname in ASP Page.
I have a problem in the ASP Page. I use the ASP page to test whether the
connection of SQL Server is fine. I use windows authentication. I get fail
when I attempt to use hostname of the destination server. Contrary, I get
success when I attempt to use IP address of the destination server. Does
anyone know how to fix this issue?
Any help will be appreciated.
thanks.
Microlong
--
Developer
QA Dashboard
Microsoft China Development Centre Tag: How can I avoid the windows authentication for viewing a report Tag: 315897
how much traffic can an ASP application handle
I am an ASP newbie. I inherited an ASP app at my new job. One of our
potential customer would like to purchase it. He asked me if I know how
much traffic can our ASP app handle. He also asked me if I can give him
the rest "tech specs" about the web application.
I told him the app uses MS ASP technology and needs a MS SQL Server DB
to store the data. But, how can I figure out how much traffic an ASP
app can handle? Also, what does he mean by "tech specs"(other than what
I already told him)?
Thanks you in advance!
Eddy Tag: How can I avoid the windows authentication for viewing a report Tag: 315894
form validation javascript inside ASP ?
Hello;
I have an ASP application which gathers information to put in a
database via some forms - I would like to do the form validation
(making sure some fields are not empty) with a Javascript script inside
the ASP file - what is the syntax for doing this? Usually I would place
the javascript inside the <head> tags, but ASP files don't have
those...
Thanks for any help.
Eric. Tag: How can I avoid the windows authentication for viewing a report Tag: 315891
problem: Stream XLS to user via ASP page
I have a page which streams an Excel spreadsheet to the user. It has worked
fine for 12mths or more, but recently I found out that it wasn't working. I
suspect the problem lies with IIS, but I'm not sure...
When the user submits a form, the page should stream the file to the user -
the user is presented with a standard Open/Save/Cancel dialog, which the
would ordinarily save to their HDD. I have updoaded the code from the live
server to my development machine (IIS5.1) - and this same code works fine.
However, on the live server (IIS6), the user is presented with the dialog
box, but rather than listing myfile.xls, it lists mypage.asp as the file to
be downloaded.
I think this must be an IIS6 issue but I don't know what. Some time before
the problem was noticed, work had been done on the live server, but AFAIK
nothing was done that was *intended* to affect this application.
Any ideas?
TIA
Chris
--
cjmnews04@REMOVEMEyahoo.co.uk
[remove the obvious bits] Tag: How can I avoid the windows authentication for viewing a report Tag: 315876
ASPX Post to another page
I have created the following code to post data from a textbox to another page
(post.aspx). I created the lblResponse to prove to myself that something was
actually getting posted, and that works. However when you click the button
it does not take you to the post.aspx page. It just refreshes the page! Any
ideas whats up with this?
Sub post_click(ByVal s As Object, ByVal e As EventArgs)
Dim objRequest As HttpWebRequest
Dim strRequest As String
Dim arrRequest As Byte()
Dim objUTF8Encoding As UTF8Encoding
Dim strmRequest As Stream
Dim objResponse As HttpWebResponse
Dim srResponse As StreamReader
' Initialize request object
objRequest =
CType(WebRequest.Create("http://localhost/rsfront/post.aspx"), HttpWebRequest)
objRequest.Method = "POST"
objRequest.ContentType = "application/x-www-form-urlencoded"
'objRequest.AllowAutoRedirect = True
' Create request body
strRequest = "Dept=" & Server.UrlEncode(txtDept1.Text)
objUTF8Encoding = New UTF8Encoding
arrRequest = objUTF8Encoding.GetBytes(strRequest)
' Add body to request
objRequest.ContentLength = arrRequest.Length
strmRequest = objRequest.GetRequestStream()
strmRequest.Write(arrRequest, 0, arrRequest.Length)
strmRequest.Close()
' Get response
objResponse = objRequest.GetResponse()
srResponse = New StreamReader(objResponse.GetResponseStream(),
Encoding.ASCII)
lblResponse.Text = srResponse.ReadToEnd()
srResponse.Close()
End Sub
----
Mark Tag: How can I avoid the windows authentication for viewing a report Tag: 315875
How to get IP address from giving hostname in ASP?
Currently, I want to get the IP address from giving hostname in the Active
Server Page. I know the hostname, I want to get the IP address via hostname
in an ASP page.
--
Developer
QA Dashboard
Microsoft China Development Centre Tag: How can I avoid the windows authentication for viewing a report Tag: 315872
help on ASP.NEt and IIS 6.0 on server 2003 ?
Dear all,
I do not know if I am in the right place to post that message so lets try.
I have build a simple application using ASP.NET. If I run my application
from my own system (W2000 Sp4, IIs 6.0) configured as a web server, it works
fine and I can access all pages without any trouble from any other work
station.
Then I I copied my all project structure and install it under Server 2003,
configured IIS to point to the proper virtual directory, use default
authentication, then I get an error saying that the page is not found.
Physically it is there, event if I type the full adress that include initial
page I got the same thing. AN other point I could notice is that if I
configure my web project to be able to get thet Browsing access, typeing the
adress shows all the files in my web project, then if I click the page which
is suppose to be display first I get the same error.
NTFS permision on the folder is full access.
What can be wrong?
thanks for your help
regards
serge Tag: How can I avoid the windows authentication for viewing a report Tag: 315871
Reusing FileSystemObject Object
Hi all,
If I create a FileSystemObject Object is it appropriate to reuse it to
perform operations on different files/folders?
Or should I create a new FileSystemObject Object for each file and folder?
--
Sean. Tag: How can I avoid the windows authentication for viewing a report Tag: 315870
Type mismatch error when accessing an array
Hello,
I have a method on a com+ object that is returning an array of objects.
I know the array is popluated as calls to check the ubound and lbound
show valid values. However, any calls to get the value of a cell in the
array results in a type mismatch error.
Microsoft VBScript runtime (0x800A000D)
Type mismatch
/idmTest/userTest.asp, line 30
I have pasted below some of the samples that i have tried. Each results
in the error above. Any suggestions on how I can access this object
would be helpful.
' Call to get the array and to validate that it is an array.
Set userObj = Server.CreateObject("idmVBApi.ComUser")
userGrpAry = userObj.getUserGroups(5790)
arySize = ubound(userGrpAry)
response.write "userGrpAry size = " & lbound(userGrpAry) & " - " &
arySize & "<br>"
response.write "userGrpAry type isArray = " & isArray(userGrpAry) &
"<br>"
' the following fails
dim index
for index = lbound(userGrpAry) to ubound(userGrpAry)
response.Write "type = " & isobject(userGrpAry(index))
response.write userGrpAry(index).grpName
next
Calls to isNull(userGrpAry(index)) also fail.
Regards
Leslie Tag: How can I avoid the windows authentication for viewing a report Tag: 315868
Dinamically creating controls
Hello!!!
I'm creating controls dinamically in ASP.NET using VB. The problem is that i
don't know how to catch the event of each button that i've create (the
buttons are created dinamically).
Any ideas??
Thanks!!! Tag: How can I avoid the windows authentication for viewing a report Tag: 315867
Update File | Summary | Attributes
I can read file attributes just fine (author, title, etc,)
But there's no way to update them. I know windows application can do it,
but can a web application update these files?
Here's the code I'm using:
Dim oSummProps As DSOFile.SummaryProperties
Dim oCustProp As DSOFile.CustomProperty
Dim sFile, sTmp As String
Dim m_oDocument As DSOFile.OleDocumentPropertiesClass
m_oDocument = New DSOFile.OleDocumentPropertiesClass
' Note: fileName is just a local file...in this case, c:\test.txt.
m_oDocument.Open(fileName, False, _
DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess)
If Not m_oDocument.IsReadOnly Then
oSummProps = m_oDocument.SummaryProperties
oSummProps.Title = myNewTitle
m_oDocument.Save()
End If
m_oDocument.Close()
m_oDocument = Nothing Tag: How can I avoid the windows authentication for viewing a report Tag: 315864
How to list the contents of a folder on an ASP page and make the list clickable.
Thank you for your previous help.
I posted regarding listing the names of files held in a folder on the server
and making the
list appear clickable. This has now been accomplished. The files are
listed - The files are clickable -
There would appear to be a problem now in that the files do not open and run
as they otherwise would do on any standard directory browsing page.
When the link is clicked, rather than open the file and play in a media
player what actually happens is a new browser window tries to open
objFl.Name which obviously it cannot.
The Work Around:
I now have the server open a new window that allows directory browsing. This
is just a temporary measure to get a list of files that open in any media
player. I would obviously like it if the code would open a media player
possibly even in a new frame this would allow me to see the files and have
them play in another frame at the same time as browsing.
I have posted this message before and received no reply so I am apologizing
in advance for this; however since I have not had a reply I felt it
necessary to post again to the group.
The code: I have decided to leave the code out of this message. What I will
say is that anyone who has a genuine interest in what I am trying to achieve
here is free to post there interest / or email me in private to
user.response@btconnect.com
If you could help on this I would be much appreciative.
Kind Regards
Malcolm Tag: How can I avoid the windows authentication for viewing a report Tag: 315863
Session Timeout
My session keeps timing out on a Windows 2003 server running my ASP.net app.
WHen running the same app on a windows 2000 server it follows the timeout
parameter in the web.config file. Any ideas why this isn't working?
--
Mike Hollibaugh Tag: How can I avoid the windows authentication for viewing a report Tag: 315859
How Do I approach?
Hi All,
I have provision for Live Demo in my website.
The user has to select the date and time for the Live demo in my website. My
problem is all the users are selecting the 1st available date & time.
Currently my date field is 3 drop down combo boxes which I am planning to
change to a calendar control and the time is 2 combo box with hour and
minute.
To get rid of the SAME TIME Selection by users I want to provide only the
date and time that are available and free. Mean I have to save the Demo
request Date and Time somewhere in Text file or Database.
Please suggest how do I go for this and what should be best path to
approach?
Thanks
Prabhat Tag: How can I avoid the windows authentication for viewing a report Tag: 315850
SQL server table date?
Hi,
Is there a way to find and display the creation or last modified date for a
SQL server table? I want to put a date on my site of when the table was
last updated. I am using ASP.
Thanks,
MVM Tag: How can I avoid the windows authentication for viewing a report Tag: 315847
asp to excel number formatting
I am trying to save a number to excel using the correct number of digits. In
asp I write a number out to HTML formated as "4.50". I now want run that
page and save the results as an excel page.
I add Response.ContentType="application/x-msdownload"
and now the number displays as "4.5" in excel. I have tried to CStr(4.50)
when going to excel but that doesn't help.
How do I show the number of decimals I want??
Thanks
Mike Tag: How can I avoid the windows authentication for viewing a report Tag: 315843
cookies
Hi trying to delete a cookie, without success it seems. The following code
to delete and check a cookie produces "yes" where I expected "no"
Anyone tell me how to delete a cookie if this code is wrong.
response.cookies("savedforum").expires = date - 1
if request.cookies("savedforum").haskeys then
response.write "yes"
else
response.write "no"
Thanks Hugh Tag: How can I avoid the windows authentication for viewing a report Tag: 315841
Dynamically Creating RadioButtonList
Hello there,
I am new to ASP .NET and am tryimg to create a RadioButtonList dynamically.
My code below gives an "Index was out of range" error.
Where am I going wrong?
Sub CreateRadioButtons(ByVal dr)
' Instantiate RadioButtonList
Dim DynamicRadioButtonList As New RadioButtonList
Dim t As Integer
t = 0
Do While dr.Read()
DynamicRadioButtonList.Items(t).Text = dr("PRO_en")
t = t + 1
Loop
'Add radio button
PlaceHolderGroup.Controls.Add(DynamicRadioButtonList)
End Sub
Thank you for your help Tag: How can I avoid the windows authentication for viewing a report Tag: 315833
How the Global.asa file changes will take effect?
Hi All,
My website is hosted with the ISP and recently I have modified my Global.asa
file for the ASP application.
So I think we need to restart the World Wide Web Publishing Service so that
the changes in the Global.asa will take effect. I think it will be difficult
for the ISP to restart the Service as there many applications will be
running. So can you suggest how can my global.asa file changes will take
effect so that I can deply those changes?
Thanks
Prabhat Tag: How can I avoid the windows authentication for viewing a report Tag: 315831
IUSR_xxx doesn't have permissions to run ASP pages
I've spent the past three hours struggling with this one and Googled the
hell out of it. Please help!
I ran IISLockdown for another problem and it trashed IIS. ASP pages wouldn't
run at all. So I Googled it forever to no avail. So I unsintalled IIS and
resintalled it. Now the status is that ASP pages ask me to login and then
they run. I assigned the maximum permissions to the IUSR_xxx account as well
as gave it read permissions to the folders it is using. No luck. I also went
to the MS KB Troubleshooting ASP Pages (
http://support.microsoft.com/default.aspx?scid=KB;EN-US;309051 ) and tried
to fix the IWAM acount. Still no luck. The only thing that I finally have
working is using the Admin account as the anonymous user (VERY bad idea) and
setting security to Low (even setting it to Medium blocks me out).
So why can't I run ASP pages using Medium security with the IUSR_xxx account
even when I've given it every possible level of permission I can think of???
I'm going crazy with a VERY unsecure website running.
Thanks,
Brian Tag: How can I avoid the windows authentication for viewing a report Tag: 315828
Date comparison quirk?
Hi,
I had a script set up to create a redirect until a certain date, and I
left the script in there after that date thinking it would just be
dormant until I changed the date parameters.
To my surprise, it started redirecting again. I must not be clear on how
dates work.
Here is the very simple code:
<%
if date < "8/20/2005" then
response.redirect(url)
end if
%>
So why does it think that 10/10/2005 < 8/20/2005 ? What am I missing?
Thanks. Tag: How can I avoid the windows authentication for viewing a report Tag: 315825
Saving word document to web server using macro?
I have a web application that enables a user to download a word or
excel file. I want them to be able to edit the file and then when they
close the file I then update the image that contains the file in the
SQL database. This is all quite simple apart from I can not see how I
can get the cotents of the file.
Things like "ActiveDocument.Content.Text" seem to work in word just for
the text but I need to get the lot in order that I can then post it
back to the webserver when the file is closed.
If you can help I would be grateful.
Thanks,
Andrew Tag: How can I avoid the windows authentication for viewing a report Tag: 315822
Hiding/Showing controls w/ VBScript during Page Load.
Greetings to all -
I'm having some fits with getting this to work but I'm near the end and I'm
hoping this one obstacle is not a huge one to get past.
Here's my scenario:
I have a page where when someone clicks on a dropdown and selects an item,
it will hide 2 other dropdown boxes that are related as the input in those
are applicable. When I save those items, everything gets into the db fine.
The problem is when the page refreshes, those 2 related dropdown boxes that
should be not visible are still visible. Is there a way in VBScript to
hide/show those controls based on the data in dropdown A? Javascript is
handling the actions but I don't think I can call Javascript on page load.
Any thoughts are welcome. I'm quite confused on any other options.
Thanks,
MN Tag: How can I avoid the windows authentication for viewing a report Tag: 315818
Hitting Oracle from an ASP page
An error keeps popping up on my ASP application connecting to an Oracle 9i
database via a SELECT statement:
Item cannot be found in the collection
corresponding to the requested name or ordinal.
However, if I put it an "On Error Resume Next", it works fine, and is able
to return the value in question. The SELECT also works fine on the database
itself. Here's the SELECT,
sqlstr = "select f_get_dept_name('123') dept_name from myschema.tbl_xyz"
sqlstr = sqlstr & " where tbl_xzy_id = 4567"
What in the world is going on?? Tag: How can I avoid the windows authentication for viewing a report Tag: 315817
Buffer overflow prevention in ASP app
Hi, all. Are there specific security precautions (input validations for
example) that are documented somewhere to prevent hackers from compromising
a credit card ASP application? In particular, can we prevent a buffer
overflow by using the LEFT function to grab only the necessary characters
from the credit card text field? Your help is much appreciated. Thanks. Tag: How can I avoid the windows authentication for viewing a report Tag: 315811
post data
in past, i learnt from the book to post data by
action=post & input type=text
now the post data is not from user input
it is from a table which is generated by asp script
i wish to generate a table with a check box at each row.
when i select the check boxs, then the rows of the table will be posted to
another html page
any hints to me for doing this?
Secondly, how about if rows of the table will be posted to a input box on
another html page
grateful if you could give me some hints.
Thanks a lot.
tony Tag: How can I avoid the windows authentication for viewing a report Tag: 315809
Hi: Could anyone pls let me know how can I avoid the windows
authentication screen for viewing a report in Reporting Service. TIA
Zahir