.axpx+javascript ?
-
How to clear value of a Textbox from javascript. How to use value of a string variable defined .aspx , in some conditions in javascript. i.e if (abc=="XYZ") return true; else return false; abc is defined in .aspx. How to enable/disable visibility of a dropdownlist from javascript.
-
How to clear value of a Textbox from javascript. How to use value of a string variable defined .aspx , in some conditions in javascript. i.e if (abc=="XYZ") return true; else return false; abc is defined in .aspx. How to enable/disable visibility of a dropdownlist from javascript.
I'm going to answer the middle question, the other two are so trivially answered by google, that you really should learn how google works to answer them. Your C# code runs on the server, the script runs on the client. You can get a changing string value using AJAX calls, but for a static string, just inject code into your web page that defines a javascript variable which contains the string in question, then you can access it on the client side.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
How to clear value of a Textbox from javascript. How to use value of a string variable defined .aspx , in some conditions in javascript. i.e if (abc=="XYZ") return true; else return false; abc is defined in .aspx. How to enable/disable visibility of a dropdownlist from javascript.
To modify a server control in javascript you need the actual HTML id. IE supports just typing the control name to get the id but I do not think FF does, and in fact it is self defeating. So here is the pattern I use. In the globals for a page js: var someControl = document.getElementById('<%=someControl.ClientID%>'); Then in the js method use someControl like an object.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway