Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6991867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:33:37+00:00 2026-05-27T19:33:37+00:00

How do I check if a submit IMAGE was clicked via Request.Form? The following

  • 0

How do I check if a submit IMAGE was clicked via Request.Form?

The following checks if a submit BUTTON was clicked via Request.Form by returning the value of the submit button if clicked:

<form action="Default.aspx" runat="server" method="post" id="newform">
<input type="submit" id="submit" value="Submit!" runat="server" />
</form>

<%
if (Request.Form["submit"] != null) //TRUE
{
    Response.Write("Submit button pushed");
}

Response.Write(Request.Form["submit"]); //Returns "Submit!"
%> 

The following checks if a submit IMAGE was clicked via Request.Form, but it DOESN’T return any value after the image was clicked:

<form action="Default.aspx" runat="server" method="post" id="newform">
<input type="image" id="subimg" src="solar_image.gif" alt="Can't show image" value="Submit Image!" runat="server"/>
</form>

<%
if (Request.Form["subimg"] != null) //FALSE
{
    Response.Write("Image Submit button clicked!");
}

Response.Write(Request.Form["subimg"]); //Doesn't return "Submit Image!"  
%>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:33:38+00:00Added an answer on May 27, 2026 at 7:33 pm

    The above code works for me in IE 9 and Chrome. Only way I can replicate is when using the Firefox as a browser.

    This link sheds more light on the issues Firefox 4.0 beta — as well as IE and Opera — do not send name/value for input type=”image”; only .x and .y coordinates are sent.

    The following check works in every browser I’ve tested:

    //Checking both x and y co-ordinates to be doubly safe
    Request.Form["subimg.x"] != null && Request.Form["subimg.y"] != null
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

var check = function(){ return false; } var submit = document.createElement(input); submit.type = image;
I have written following code to set the status of the image button to
I'm building a form with a single field and a submit button. A user
I'm using a background image for a submit button that I've using for a
I have a form to upload image like below <form name=sample enctype=multipart/form-data action=index.php method=post
I have set of images and checkboxes like below <form name=food_type_form method=post action=proc.php> <img
i have a web form who send post variables like: <form action=teacher.php method=post> <input
I get the following error in my image upload code: Warning: getimagesize(Array) [function.getimagesize]: failed
So I have this function here: function ShowMessage() { var themessege = document.getElementById(Form).textarea1.value; var
Hello I have a c# application that has a button Submit and in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.