I inserted an image with scr value and DescriptionUrl defined in Aspx and I am changing the value of source (scr) and DescriptionUrl (longdesc) via Javascript;
It turns out that after page_load the default values return and what was changed via javascript is lost.
In this case, what is the best solution?
ASPX and JAVASCRIPT:
function MudarCheckbox(id) {
$("#" + id).attr("longdesc", "novaDescricao");
$("#" + id).attr("src", "novaUrl");
}
//Aspx
Dim minhaImagem As Image = Page.Master.FindControl("ContentPlaceHolder").FindControl("minhaImagem")
//Obtem controller da img sem as alterações em JS
<asp:Image ID="minhaImagem" OnClick="javascript:MudarValor(this.id);" runat="server" ClientIDMode="Static" ImageUrl="minhaUrl" DescriptionUrl="minhaDescricao" />