I am using JQuery to update some input values – and on the screen it looks as if the values are being set properly.
I am doing this:
var company = $('[id$=' + idTag + ']');
if (company) {
company.val(ret.CompanyDocTitle);
company.attr("DocumentGuid", ret.CompanyDocumentGuid);
}
I can see the input text field getting set – so I know it has value.
When I go to save the information (Posting to ASPX page) when I try to retrieve the Text of my input box, its coming up blank
myobjtext = P1bRespComp.text
my aspx page is using a TextBox
<asp:TextBox ID="P1bRespComp" runat="server" ></asp:TextBox>
any thoughts on this?
EDIT
Found the issue I think – my INPUT field is marked as Disabled to prevent users from entering data in there – however – I do want the Value and other Attributes –
Is there a way I can get the Update value and attributes on this disabled INPUT field?
You can improve your js using this:
Jquery only set value and attribute if the element exist.
I think you have to set the “name” attr in ASP.