473,385 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Simple query

Hi

My ASP page is completely ignoring the following bit of code stuck in the body of a page.

I want to display a message if the submit button was pushed on the same page.

<% If Request.form("submit") = "Submit" Then

Response.Write "Your photo was successfully uploaded."

END IF %>

The action of the form is the same page.

Thanks
Jul 19 '05 #1
5 2134
<%
Response.Write "The value of request.form(""submit"") is " &
Request.Form("submit") %>

What does that yield? Note that if you press enter to submit a form or use
Ctrl+M, that value will be blank. Wouldn't you want to base that response
on something else? Like

<%
If MyUploadComponent.Files.Count > 0 Then
'''code to deal with upload
response.write "Your photo was successfully uploaded."
End If
%>

Ray at home
"Michael Gamaroff" <mg*******@tecbrand.com> wrote in message
news:jz*****************@news.indigo.ie...
Hi

My ASP page is completely ignoring the following bit of code stuck in the
body of a page.

I want to display a message if the submit button was pushed on the same
page.

<% If Request.form("submit") = "Submit" Then

Response.Write "Your photo was successfully uploaded."

END IF %>

The action of the form is the same page.

Thanks
Jul 19 '05 #2
Check the value of your Submit button
It may not be 'Submit'

--
Roji. P. Thomas
SQL Server Programmer ;)
________________________
"Michael Gamaroff" <mg*******@tecbrand.com> wrote in message news:jz*****************@news.indigo.ie...
Hi

My ASP page is completely ignoring the following bit of code stuck in the body of a page.

I want to display a message if the submit button was pushed on the same page.

<% If Request.form("submit") = "Submit" Then

Response.Write "Your photo was successfully uploaded."

END IF %>

The action of the form is the same page.

Thanks
Jul 19 '05 #3
Have u set the method property on ur form, ie
method="post" so the data is sent to the server side!

-----Original Message-----
Hi

My ASP page is completely ignoring the following bit of code stuck in the body of a page.
I want to display a message if the submit button was pushed on the same page.
<% If Request.form("submit") = "Submit" Then

Response.Write "Your photo was successfully uploaded."

END IF %>

The action of the form is the same page.

Thanks

Jul 19 '05 #4
If ur doing a file upload via a html web page using a file
input object where a user pick a local file for upload,
then r u using multi-part form data, if so u loose access
to request object on the server. Might need to get access
to the other form objects via ur upload com used to do the
upload.
-----Original Message-----
Hi

My ASP page is completely ignoring the following bit of code stuck in the body of a page.
I want to display a message if the submit button was pushed on the same page.
<% If Request.form("submit") = "Submit" Then

Response.Write "Your photo was successfully uploaded."

END IF %>

The action of the form is the same page.

Thanks

Jul 19 '05 #5
Try

<%
if Trim(Request.Form("submit") & " ") = "Submit" Then
blah blah blah
end if

%>

Also, keep in mind that the "Submit" is case sensistive.

Mike
"Michael Gamaroff" <mg*******@tecbrand.com> wrote in message news:jz*****************@news.indigo.ie...
Hi

My ASP page is completely ignoring the following bit of code stuck in the body of a page.

I want to display a message if the submit button was pushed on the same page.

<% If Request.form("submit") = "Submit" Then

Response.Write "Your photo was successfully uploaded."

END IF %>

The action of the form is the same page.

Thanks
Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: unixman | last post by:
As usual, it is 2:00am, and I'm pulling my hair out, finally resorting to posting in the newsgroups for help. :) Simple problem, in theory. Given table "map": CREATE TABLE map ( entry_id...
6
by: Eddie Smit | last post by:
field- field- surname town ---- ---- john NY john Vegas john Boston eddie Boston eddie New Orleans eddie NY
2
by: Mrs Howl | last post by:
I have a query that just reads one table and appends to an output table, one-for-one. No criteria. It's not a Total query (i.e. no group by). It normally run run in minutes, but gets horribly...
1
by: j.mandala | last post by:
I created a simple link between two tables in a query. TableA has Social Security numbers stored as Long Integer Data. (I imported this table). The Join is between these two fields Table ...
3
by: Don Sealer | last post by:
I'm guessing this is pretty simple however not simple enough for me. I'm developing a database to track expenses, income, banking transactions, etc. I have a very simple query with four fields,...
2
by: Don Wash | last post by:
Hi All! I've been searching everywhere for a simple sample of producing a bar graph using CrystalReport by specifying SQL Query, and I've found none of it! I find so many complex samples with so...
3
by: John Baker | last post by:
Hi:7 Newby here to ASP, and using the ASP.NET Web Matrix development tool. While that tool looks great for a Newby, I have run into a snag. I have an HTML Text Box which I have named HireInput,...
27
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res =...
2
by: Fendi Baba | last post by:
I created a person table with various fields such as Suffix, Salutation, etc, Some of these fields may not be mandatory for example suffix. In the actual table itself, I only have a field for...
9
by: Emin | last post by:
Dear Experts, I have a fairly simple query in which adding a where clause slows things down by at least a factor of 100. The following is the slow version of the query ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.