Currently experiencing a two-part issue, one relating to CSS and the other to codebehind. Below is the navigation code for my buttons:
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Buttons/upviewassets.png" OnClick="ImageButton1_Click" />
<asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/Buttons/upaddassets.png" OnClick="ImageButton2_Click" />
In the code snippet above, all the buttons are positioned side by side. The code behavior on the OnClick() event is as follows:
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
ImageButton1.ImageUrl = "Buttons/dnviewassets.png";
ImageButton2.ImageUrl = "Buttons/upaddassets.png";
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
ImageButton1.ImageUrl = "Buttons/upviewassets.png";
ImageButton2.ImageUrl = "Buttons/dnaddassets.png";
}
Issue arises when attempting to utilize Response.Redirect in conjunction with the button clicks, resulting in images not changing properly. Additionally, without Response.Redirect initially, a quick jump occurs on first click but subsequent clicks function correctly.
Secondly, CSS was explored as an alternative method to manage image changes on button clicks, yet unsuccessful in achieving desired results. Seeking to replicate tab-like appearance within master page layout.
Appreciate any assistance!