ASP.NET VB cannot change Label'sText by Javascript
ASP.NET
1
Posts
1
Posters
1
Views
1
Watching
-
I use localStorage to save a item called "key1", and then I want to read the value and display it on Label('LabelLS'). But the Label'text does not change. I am sure localStorage get the key1 item(I had used document.write(d) to print key1 item). Does somebody know how to solve it?
Protected Sub ButtonSubmit_Click(sender As Object, e As EventArgs) Handles ButtonSubmit.Click
Dim str2 As String = " var d = localStorage.getItem('key1'); var c = document.getElementById('LabelLS'); c.innerHTML = d; "
ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "showmessage2", str2, False)