ianinspain
asked on
Webform: Click picture instead of a button to submit?
Hi there,
just created a webform and normally I would have a submit button that would automatically submit it to the server so I can pickup up my click event on asp.net..
Is it possible to click a picture i have instead of a button?
I have used a standard <img src=""> to insert my picture .... I suppose I should have used a Picture VS.NET Web control?? Is this correct?
I wonder if its possible to force a <img src=""> to submit a form and how I would go about this?
Any help or info would be gratefully appreciated
Ian
just created a webform and normally I would have a submit button that would automatically submit it to the server so I can pickup up my click event on asp.net..
Is it possible to click a picture i have instead of a button?
I have used a standard <img src=""> to insert my picture .... I suppose I should have used a Picture VS.NET Web control?? Is this correct?
I wonder if its possible to force a <img src=""> to submit a form and how I would go about this?
Any help or info would be gratefully appreciated
Ian
no use image button instead
<asp:ImageButton id="ImageButton1" runat="server"></asp:Image Button>
and u can double click to see teh click event
<asp:ImageButton id="ImageButton1" runat="server"></asp:Image
and u can double click to see teh click event
You can use JavaScript to do this.
<img src="yourImage" onclick="document.all.your FormName.s ubmit()">< /img>
This will submit the form when the image is clicked on.
<img src="yourImage" onclick="document.all.your
This will submit the form when the image is clicked on.
ASKER
Hi praneetha...
Yes I tried double clicking it ...which then shows me the codebehind... but I don't see the event being created...
Does it work your end??
Yes I tried double clicking it ...which then shows me the codebehind... but I don't see the event being created...
Does it work your end??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ahh it was my fault i used a Image rather than an image button....
whooops!...
I would have thought that the image control would have some events too though..
thanks..
whooops!...
I would have thought that the image control would have some events too though..
thanks..
i think image control is nothing but html image with runat server...it doesn't have any events..
ASKER
Thanks anyway.. awarding points now..
much appreciated
ian
much appreciated
ian
thanks for the points...good luck
ASKER
Am I missing something..??