I am setting a custom attribute in the markup like this..
<asp:TextBox runat="server" guid="" ID="txtlocation1" type="text" class="autocomplete short-field require" name="location1" autocomplete="off" datasource="locations" />
Javascript sets the value of it and I am trying to read the value on button click like this…
var val = txtlocation1.Attributes["guid"];
I always get an empty string.. any ideas?
PS: I am not setting the attribute in code though.
custom attributes will not be sent back to server…you may use a HiddenFeild control instead to hold your data and change it with javascript and on server you will read the updated value