javascript - Get HTML inner HTML in C# when element not runat="server" -
i have html span contains number.
the span has value set javascript, not runat="server"
i need value contained in span, , store in c# string.
this proving more difficult expected.
i able alert box displays value doing following:
clientscript.registerstartupscript(gettype(), "ir", "settimeout(function(){alert(document.getelementbyid(\"loaninterestrate\").innerhtml);}, 3000)", true);
but cannot see how return value c# code.
i know because clientscript.registerstartupscript
returns void, there way of setting return value this?
or there way of getting html element.
i know can use hidden server side div, not suit purposes.
i need way obtain value of html span using c#.
any ideas, have been trying while , not got anywhere, , think is useful thing do.
you cannot create "real" runat=server
element/control without doing full postback server.
the best approach may write script stores innerhtml
asp.net hidden field right before submit page.
Comments
Post a Comment