hiddenfield - The value is not retained with Page.ClientScript.RegisterHiddenField in asp.net -
in asp.net c#, syntax:
page.clientscript.registerhiddenfield("hffilename", value);
i can define hiddenfield:
1) why in code , value nothing:
function pageload() { alert(document.getelementbyid("hffilename").getattribute("value")); }
2) whats difference between hiddenfield , 1 can define asp.net toolbox:
<asp:hiddenfield id="hiddenfield1" runat="server" />
thank in advanced.
it working before, changed code in update panels , not working, possible of that?
try following:
on code behind:
protected void page_load(object sender, eventargs e) { page.clientscript.registerhiddenfield("hffilename", "testvalue"); }
on jquery:
$(document).ready(function () { alert(document.getelementbyid("hffilename").getattribute("value")); })
this working me.
Comments
Post a Comment