On Error Resume Next, How To Show The Rest Of The Page

I'm on the last piece of this project, when a user goes to this page "myfolder.asp" it shows the contents of their folder.

If they don't have one created yet, I want to give them a friendly message: "You have nothing in your folder!" , and continue with the rest of the HTML code, but then ignore the Repeat Regions and dynamic text thats inside the HTML.

Right now I have it woking if the table exists, it shows the records. If I delete the table, I have this message at the top of the screen and nothing else: "You have nothing in your folder!"

Here is the code:

View Replies


ADVERTISEMENT

On Error Resume Next

I've a query on On Error Resume Next. I've explained what I understand for each case, I'm not sure that this is true.

Case:
1] Used in Function/Sub: will resume to the next statement in the
function or sub; but will not affect the error out side of the functions

2] Used at the top of the asp page: will affect all the page code and
will not affect the function/sub in the page at all.

3] Used in the page where ever required:?

View Replies View Related

Error Resume Next

I put the On Error Resume Next command as the very first line in my ASP
pages, which may contain various inc files and sub-routines/functions, so
that I can try and stop the dreaded DB error messages displaying to visitors
and would-be hackers.My question is, does this one statement at the top of the page cater for all of the code that might be executed in the page, in the include files and in
sub-routines/functions or do I have to put the statement in certain places
as well?The reason I ask is that I'm sure if I get one of my include file names
wrong it brings up an error rather than going straight through and
displaying a funny page.I hope I don't have to put it in various places as I like to have this one statement so that I can flip back and forth between live and dev time and
having to go into 'x' amount of pages to flip between these 2 states would
be tiresome.

View Replies View Related

On Error Resume Next

My code works when the table is not found. But when the table is found it doesn't do the else part..Code:

Dim oConn
Dim oRs

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Store_Form"
Set oRs = Server.CreateObject("ADODB.Recordset" )

elseif campo = "txtAN_GEN" then
on error resume next
Set oRs = oConn.Execute("SELECT * FROM 00_MOD48")
If err <> 0 then 'If table not found
GetFieldValue = "00001"
else
GetFieldValue = "150"
end if

View Replies View Related

Cancel On Error Resume Next

I am using On Error Resume Next to allow my application to deal with errors accessing the database, i.e. if the DSN-less connection doesn't work then it tries the DSN connection and this is fine.

What I want to find out is how can i stop the rest of the page continuing after errors, in essence I want to cancel the On Error Resume Next statement after the database connection stuff is done so that errors will stop the page and I can debug them.

View Replies View Related

Need To Use On Error Resume Next But Timing Out

I have a piece of code that i created. It actually works as it should. The only problem is the objrs2.update causes an error-duplicate primary key. However when i check the database it has done what it should.

I then tried to use on error resume next, but it keeps timing out and i do not want to extend the time limit. Does someone know how to get round this? Code:

View Replies View Related

Avoid On Error Resume Next?

Is there a way to avoid On Error Resume Next for:

cnn.Open strCon
SQL = "EXEC Customer @txtEmail='" & email_address & "'"
set rs = cnn.execute(SQL)

'On error resume next
rs("email_address")

'// This record does not exist thus throwing up an error. I could use On
Error to resume and then do this
'// If rs.eof or rs.bof
'//

.....But I hate this convention as I find debugging a problem. Is there a
better way?

View Replies View Related

QUERY: 'On Error Resume Next' Scope Rules

This has been puzzling me for very long time and no where has
talked about the scope of a 'On Error Resume Next' statement.

When we program ASP(.NET) pages then we usually like to let
ASP(.NET) stop at errors and report back to us. However there
are parts of our scripts that we know an error will be thrown
and we encapsulate that area inbetween:

On Error Resume Next
Err.Clear
'Try block
If Err.Number Then
'Catch block
End If
On Error GoTo 0

This is similar to the infamous try {} catch(e) {} blocks in
Java/C++, etc.

If we forget the last line 'On Error GoTo 0' then our ASP(.NET)
scripts runs over all errors thrown and we find it hard to
find bugs. So the big question is, does 'On Error Resume Next'
go out of scope when it's written inside a block
(eg. Function)?

Function Function1()
On Error Resume Next
'Our code
End Function

When the Function1 call returns, does the outside calling scope
automatically stays as it was (On Error GoTo 0)?

View Replies View Related

Upload Picture And Send With Rest Of Form Using ASP

I need to know how to make it possible for someone to send me a .gif or jpeg image through a form, by using a browse button etc.

Basically so after they have selected the picture they want to submit (by clicking on browse) and after they have filled out the rest of the form, when they submit it I would like the image selected to upload and be sent to me (with the rest of the form).

I have already got the rest of the form, all I need is the 'field' where they will select there picture, and the script that will enable it to upload.

View Replies View Related

Slow ASP Page Need GIF To Show

I have a basic asp page running that is very slow it has to crunch some info
and when a user hits submit it can take a minute or more for a response. So
what I did was call a second page that should show a gif that is asking them
to be patient.

Unfortunately this never shows (See below). I have tried
other ways as well, but I have been unsuccessful in getting the gif to show.
This has to be simple but I'm not a skilled asp developer so I don;t know
how to do it. Anybody have any ideas?

View Replies View Related

Don't Show The Page As A Part Of URL.

The web page has page1.asp, page2.asp, page3.asp, etc... However, When we type http://www.myserver.com, and go to different pages, the URL will be unchanged. How to do that? Usually, it will be http://www.myserver.com/page1.asp, http://www.myserver.com/page2.asp, etc..., with the actual page.

View Replies View Related

Some Of JPG Files Refuse To Show Up In The ASP Page

Some of JPG files sitting in the same folder show up OK on an HTML page,
while the other do not as if they are not there or their name is misspelt.

Tried low-upper case in an ASP page, and in the files names - same result
Then I noticed that the same files do not show up in the preview pane in the
Windows Explorer althought they still are described by Windows Explorer as
valid JPEG files.

These "wrong" files are not necessarily bigger then the good ones and in
Microsoft Photo Editor they all (good and bad) show up well and they all are
118 Pixels/cm and True Color (24 bit)

What might be wrong with these files? If there is not direct answer, perhaps spmeone recommend me a correct newsgroup?

View Replies View Related

Show/Hide Part Of A Page

I'm working on an asp page where I need to be able to click on a link and then show or hide a section of the page. Kind of like folding markers. I can do it by simply refreshing the page but I'd prefer for it to just open and close. Is there a way to do this?

View Replies View Related

How To Show Address Book In A Web Page

How can i show my microsoft address book email list, and show it as a list in my asp web page Code:

View Replies View Related

If Checkboxes Not Selected Then Show Error, Whats The Best Way?

I have a form and if none of the radiobuttons are selecte or any of the txt fields are empty i want it to display an error, also if the entry in a txt field is not numeric i want it to display an error, if there are no errors then i wanted to display a message

what is the best way of going about this??

View Replies View Related

Turn Off Show Friendly HTTP Error

how can i turn off 'Show Friendly HTTP Error Messages' in IE Browser to get a better error message?

View Replies View Related

Index Server And PDF - Results Show In Admin Console But Not On ASP Page..?

I have set up Index Server in IIS to search my intranet. I've installed the Adobe PDF filter so that words from PDF files are included.

I can get results from PDFs when querying the catalogue in the Windows console. However, I have tried various ASP Search pages and they all ignore PDF files from a browser (even though the scripts include the pdf extension).

View Replies View Related

How Do I Reload The Page To Show New Info With Multiple Submit Buttons

i am new to asp and web designing, and was wondering how to reload a page so that a different set of images appear, depending on which submit button is pressed. Code:

View Replies View Related

Resume Download

Can ASP resume download/ upload when uploading large files using ASP, like Download programs do? If so, can anybody point me to tutorial or a script I can start with?

View Replies View Related

Cdonts Resume Attachment Code

i need 2 files html as well as asp forms. pls help me with working code.

View Replies View Related

HTTP Error 403 - Forbidden Error While Accessing Html And Asp Page

well i m developing application in asp when i want to access these pages from ie5 it shows error HTTP Error 403 - Forbidden in internet explorer http://localhost/Mail/email.htm .

View Replies View Related

Friendly HTTP Errors Causes Std Error Page In IE (no Its Not An Asp Error!)

I thought this is more of an IE issue but i've had no joy on that group
perhaps somebody here will have a clue.

If i click a link to a web page embedded in Excel (97 OR 2000) i get the
standard error page displayed by IE (you know, the 'cannot find server or
dns error' page).

Turning off 'show friendly http error messages' alleviates this.
(Unfortunately this is the Windows default setting!)

Whats going on?!?! Code:

View Replies View Related

404 Page Error

I downloaded this custom 404 error page which sends an email, was wondering if anyone could have a look at it for me, for some reason, its not picking up the function, I have tried the mailing code and it works fine. Code:

View Replies View Related

Gives Page Error

During a Script session, when I hit the browser 'Back' button I get Pag
error.
I get this error only from a couple of the pages.
Would anyone what the problem could be? or how to go about fixin
this?

View Replies View Related

Error 400 Asp Page

In random case I have the problem of Error 400 bad request. My appliction
is asp pages with visual script, internet explorer 6.0, com+, and sqlserver
2000 as database.

View Replies View Related

Error Page

i have a link from page1 to page2. this link uses a querystring to transfer data. usually i have no problems using querystring t transfer data. bt for the first time page2 does not display.an eror page displays. i had a look at the properties of the error page to see if the url is correct and i noticed somthng iv never seen before.this is

it:
res://C:WINDOWSSystem32shdoclc.dll/http_500.htm#http://gisserver/verslag/Trans_Edit...tId=141&TId=264

View Replies View Related

Error On Web Page

what this error means?

HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)

View Replies View Related

Use Error Page

I'd like to discuss the concept of creating an error page which will handle the website content display. I need it for Search Engine Optimization. The problem is that SE does not read pages with querystrings like:

website.com/mypage.asp?id=123.

Therefore, there is a solution to it to make a link look like website.com/mypage/id/123 (which does not exist), and error page will display the content of website.com/mypage.asp?id=123 page, if url is website.com/mypage/id/123...Do you think that is a good practice to implement? Can anyone show the example? Should I use Msxml2.ServerXMLHTTP to pull another webpagecontent?

View Replies View Related

Error Page

I found some websites display nice pages other than a plain error page when you type a wrong URL. How can I do that?

View Replies View Related

Error In Asp Page

Hey i am getting the following error in my asp page

Microsoft VBScript runtime (0x800A000D)
Type mismatch
/newfolder/temp1.asp, line 135

temp1.asp
invamt = qty * price -----> line 135
qty and price come from the database. i am using Microsoft SQL Server. qty has the value 100 and price has the value 600.00. This same code is running fine with Msaccess 2000 and asp. But its giving me error if i use SQL server and asp. i tried this code with sql server in vb, there also its running fine.

View Replies View Related

404 Error Page

I have managed to find the answer to my query.how to customized 404 error page.

View Replies View Related

IIS Error ASP Error Page

I have a strange error with my script. I am trying to upload a file to the webserver using clsupload and i egt the following error when the script runs:
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings. Please try the following:
If you typed the page address in the Address bar, make sure that it is spelled correctly.If you are trying to reach a secure site, make sure your Security settings can support it.Click the Back button to try another link.
Write Error
I tried usploading using another file upload component and got the same error which makes me thinks it could be IIS permissions related. it doesnt even class it as a 500 error it just says this.

View Replies View Related

Error Page E-mail

What i'm trying to do is if a person hits an error page, these are differnt error pages not the 404's or 500's.. When they hit that page i want it to send me an e-mail with all the information that was displayed on that page.

Can i do this in java or asp?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved