c# - get asp:textbox value in client side using javascript function doesn't work -


this code doesn't display value, don't know why?

i have server control:

<asp:textbox id="txttest" runat="server" visible="false" textmode="multiline"                     rows="3" columns="23" cssclass="white-scroll" /> 

in javascript function:

var eventtext = document.getelementbyid('<%=txttest.clientid%>').value; alert (eventtext); 

i enter text click on button call javascript function, alert box doesn't display entered text.

edit: when initialize text text="some text", displayed in alert, want enter text in client side , value of in javascript function.

thanks

using label or textbox visible set false can access value in javascript

sol

1) 

make div , set style="display:none;" label not display @ ui(browser) value can access in javascript.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -