ASP.NET > Image Button HTML result code
I have a weird problem. I am using a a image button code from asp.net like this:
<asp:imagebutton id="bAddAssociacio" runat="server" ImageUrl="Images\remove.gif"></asp:imagebutton>
Usually the runat="server" tag means that it will automatically have a JS functions, named __dopostback(...), set on a JS event like "onclick" or "onchange" , so actually the HTML code we have in our browser is something like this:
<INPUT type="button" name="button" id="button" onclick=" __doPostBack('button','')/>"
The problem is:
with imagebutton i don't see that code... i just se a html normal image type, with no __doPostBack at all. But the even more weird thing is that it is submitting my petitions to the server as if it was there. So could anyone explain me what's going on.
There is nothing odd about the behaviour
Hope this answers your question
I understand your point, but in fact, ain't in front of my computer right now, but i am not wrong: It does add the "__doPostBack(..)" function on any other ASP.NET web control.
I will check on that tomorrow but i am almost 99% sure it does. That's why i was surprised to see that asp:imagebutton doesn't add it.
Tomorrow i will repost about this, thx for the answer btw i appreciate
My bad. You was completly right, i did saw some HTML server controls in the design that i assumed they were asp web controls.
I appreciate your help, thx.
By sunilbenjamin in forum ASP.NET
Last Post: 08-01-2005, 04:12 PM
By Mike Upshon in forum dotnet.announcements
Last Post: 08-16-2002, 06:33 PM
By rkbnair in forum ASP.NET
Last Post: 08-01-2001, 11:20 PM
Last Post: 04-17-2001, 01:45 AM
By Lance Huang in forum VB Classic
Last Post: 04-06-2000, 07:09 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL