I gave a button an attribute called notetype.
<asp:ImageButton ID="bttnSave" notetype="none" runat="server" ImageUrl="~/images/bttnSave.gif" onclick="bttnSave_Click" />
I have a function from a different button's click that sets that variable to some type.
function addnotes(Type,IncId,Acc,Wit,Claim,Inj,Prop,Media) {
var bttnopenmodal = $get('<%=bttnopenmodal.ClientID %>');
var bttnSave = $get('<%=bttnSave.ClientID %>');
if (Type == 'Inc') {
bttnSave.notetype = 'Inc';
}
bttnopenmodal.click();
return false;
}
However in the C# code of the button:
protected void bttnSave_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect(bttnSave.Attributes["notetype"]);
}
the value of the save button's notetype is still 'none' even though i change it in javascript. I even alerted to make sure it changed the notetype and it did. I tried to update the button with an updatepanel to no avail. How can i correctly change that notetype?