Hi guy i have a javasciprt will create a value , is that any way for me to capture the value in my c# back end code.
function GetKey(){ return Key; } //key is a combination value
Thank you
C# in backend
public String MyVariable;
MyVariable = "Some Value";
ASPX
<%=MyVariable %>
<script type="text/javascript"> var key = JSON.parse('<%=JsonConvert.SerializeObject(someObj.GetKey()) %>'); //now you can use key in your js logic </script>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.