J
Jonathan Wood
I'm trying to convert some old HTML pages to ASP.NET.
I'm experimenting with code that responds to a button click. But although
the mouse turns into a hand pointer when it is over the button, absolutely
nothing happens when I click it.
Does anyone know if this could have anything to do the fact that my button
is on a master page (along with the handler)? That shouldn't make any
difference should it?
My button looks like this:
<p> </p>
<asp:ImageButton runat="server" id="imgAddToCart"
ImageUrl="../images/addtocart.gif" OnClick="imgAddToCart_Click" />
<p> </p>
And at the top of the same master page, I have something like this:
<script runat="server">
protected void imgAddToCart_Click(object sender, ImageClickEventArgs e)
{
// Test code using HttpWebRequest here
}
</script>
Unfortunately, my project will not currently run in Visual Studio due to
some of the older constructs in the HTML code so I can't set breakpoints.
I'm just running it under Expression Web. But shouldn't the page refresh
after the postback or something? I get nothing.
Any tips appreciated.
Jonathan
I'm experimenting with code that responds to a button click. But although
the mouse turns into a hand pointer when it is over the button, absolutely
nothing happens when I click it.
Does anyone know if this could have anything to do the fact that my button
is on a master page (along with the handler)? That shouldn't make any
difference should it?
My button looks like this:
<p> </p>
<asp:ImageButton runat="server" id="imgAddToCart"
ImageUrl="../images/addtocart.gif" OnClick="imgAddToCart_Click" />
<p> </p>
And at the top of the same master page, I have something like this:
<script runat="server">
protected void imgAddToCart_Click(object sender, ImageClickEventArgs e)
{
// Test code using HttpWebRequest here
}
</script>
Unfortunately, my project will not currently run in Visual Studio due to
some of the older constructs in the HTML code so I can't set breakpoints.
I'm just running it under Expression Web. But shouldn't the page refresh
after the postback or something? I get nothing.
Any tips appreciated.
Jonathan